Problems with UTF8

GIRARD Damien dam-pro.girard at
Sat Mar 1 06:21:05 EST 2008

Trevor DeVore a écrit :
> On Feb 29, 2008, at 1:04 PM, GIRARD Damien wrote:
>> I want to store texts in UTF8.
>> But, I have a problem, when I do that function: 
>> unidecode(uniencode("eéàèe"),UTF8), all accented characters diseapear.
>> If I let them as UTF16, this work, accented characters are returned.
>> It is a Runrev bug ? or maybe I did something wrong ?
> Hi Damien,
> Are you sure the accented characters are disappearing or do they just 
> appear as junk in the rev message box (or field)? I ask because once 
> you encode to UTF8 you can't necessarily display the text in Rev 
> accurately. What happens if you first encode the text as UTF8 and then 
> decode to UTF16 and assign it to the unicodeText property of a field?
> put unidecode(uniencode("eéàèe"),UTF8) into theUTF8Text
> set the unicodeText of field 1 to uniencode(theUTF8Text, "UTF8")
> Do the characters look right then?
> Regards,
Thanks Trevor, I read in the 2.9 Beta 11 documentation that Runrev 
handle fine UTF16 but not UTF8.
And your solution permit to solve the problem, accented characters are 
now rendered properly. This confirm the new documentation.

I will investigate further in order to solve the endianess issues. (but 
it is a bit hard to do some test without a PowerPC computer).



More information about the use-livecode mailing list