[V4RB] SQL Queries/RB5.1/Unicode

Stan R. Busk maxprog at mac.com
Fri Apr 25 21:55:51 CDT 2003


Hi,

>> I have tried this. I have added a new record with my word "metá" 
>> directly using my app compiled with RB5.1, that is storing UTF-8 to 
>> valentina directly. Query now works as expected! This seems to be
>> the solution but it means I need to add a method to my app to convert 
>> all existing records to UTF8.Then I just need to convert Valentina's 
>> strings back for displaying them to the user. 
>> ConvertFromUTF8(DB.Table.Field.GetString,
>> SystemEncoding) works like a charm for me.
>
> You don't need to convert back to unicode if it's RB5. Just define the 
> encoding as UTF8 and RB will handle it:
> editField1.text = DefineEncoding(DB.Table.Field.GetString, 
> encodings.utf8)

True! Thanks for the tip, DefineEncoding is best here. Anyway it would 
be great a Valentina built-in GetUTF8string function or similar... :-)

>> Is there a drawback storing UTF8 string to Valentina? what about 
>> sorting?
>
> Yes, that's the drawback (and case changing). That's why we need real
> UTF-8 support in Valentina (which Ruslan is working on, but didn't
> answer my question :->).

Would be great as storing Unicode seems to work fine afaik and it seems 
it will replace all encodings as time goes on.

Stan

-- 
MAX Programming, LLC
<http://maxprog.com>



More information about the Valentina mailing list