[V4RB] SQL Queries/RB5.1/Unicode

jda jda at his.com
Fri Apr 25 14:46:16 CDT 2003


>
>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)

>
>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 :->).

Jon


More information about the Valentina mailing list