Cross-Platform encoding issues

Marcello Bertoli mbertoli at libero.it
Fri Apr 2 04:27:32 EDT 2010


Hi Devin,

Thank you very much for your help. I'm working on the same project as Jacopo.

The problem is that we need to filter only an occurrence of the euro character, not the whole field. The user can write in many situations the euro character where he wants, as many time he wants. Besides we need to apply the unicode transformation not directly in fields but in variables as we have lots of routines that take the fields values, put them in variables and only after a few transformations write them to the sql database.

Is there a way to actually deal with the unicode content of a variable?

Thanks in advance
Best
Marcello

On 31/mar/2010, at 22.53, Devin Asay wrote:


> Yes, the html entity for the Euro symbol is problematic and inconsistent between mac and windows. But this works on both Mac and Windows (beware word wrap):
> 
> set the unicodeText of fld "test" to uniencode((numToChar(226) & numToChar(130) & numToChar(172)),"utf8")
> So as long as you store the characters sequence corresponding to ascii 226, 130, and 172 in your database you should be able to render them successfully.

> On Mar 31, 2010, at 6:30 AM, Jacopo Lupi wrote:
> 
>> Hi all,
>> 
>> I'm building a cross-platform application based on an postgresql database.
>> 
>> The postgresql database encoding is "utf8". The revclient sets the "client_encoding" of the postgres session to "latin9" and if it is running on mac it translates the data with "mactoiso" or "isotomac" functions. I need to set the postgres "client_encoding" to "latin9" otherwise I can't retrive text with accents correctly on the macplatform.
>> 
>> Everything seems to work fine exept for the euro symbol. I can find no way to type the euro symbol in mac and make it readable under windows and viceversa.




More information about the use-livecode mailing list