Unicode Displaying in Runtime Revolution #2

Trevor DeVore lists at mangomultimedia.com
Thu Apr 21 00:31:34 EDT 2005


On Apr 20, 2005, at 8:49 PM, Marisa K. wrote:
>
> I have the question about the unicode again. I want to query data from 
> database, which are unicode. I used the revDataFromQuery function to 
> query data from database. However, the result is "". So, I 
> tried on setting unicodeText property, it turns out "ฎฎฎฎชฎฎฎ" .
>
> Also, I tried to save the result of the query as binfile. Still, it 
> didn't work. As, the result from revDataFromQuery already went wrong. 
> Then, I tried on usinng Database Query Builder(from /Tool Menu/) for 
> the hope that it will query data correctly, but it doesn't?!!
>
> So, is there a way to query unicode data with or without 
> revDataFromQuery function to make data display correctly?

Marisa,

I imagine your database is storing the text as UTF8.  Revolution fields 
use UTF16.  Setting the field using this:

set unicodeText of fld "Unicode" to uniEncode(myDatabaseValue, "UTF8")

This should display the characters correctly.


-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com


More information about the use-livecode mailing list