Crossplatform EURO sign?

Richmond Mathewson richmondmathewson at gmail.com
Wed Jun 10 10:40:33 EDT 2009


Just tried that by running up a stack on Mac:

worked on Mac,

didn't on Ubuntu 8.04     sorry!

Devin Asay wrote:
>
> On Jun 10, 2009, at 7:15 AM, klaus at major.on-rev.com wrote:
>
>> Hi all,
>>
>> any hint on how to handle crossplatform EURO signs?
>> I mean the euro sign is unfortunately NOT translated
>> isotomac/mactoiso, so how do you handle user input of this
>> (and other) character(s) in your crossplatform apps/stacks/databases?
>>
>> Not to mention of ERUO signs in label fields, when you do not
>> want to loop over all fields and place the appropriate signs
>> on "pre-/openstack".
>>
>> Any hints heavily appreciated, inm the meantime we use "EUR" ;-)
>
> Hi Klaus,
>
> HTMLtext is no good, because the ¤ entity, while Rev correctly 
> renders it as a Euro sign on the Mac, on Windows it produces a generic 
> currency sign.
>
> That leaves us with unicode. The code point for the Euro sign is hex 
> 0x20AC, which is decimal 8364. Usually you get reliable results by 
> using unicode escape entities in htmlText, but again htmlText fails 
> us, because this doesn't work:
>
>    set the htmlText of fld 1 to "<p>€"
>
> The only reliable way I can see is UTF-8. On my Mac the UTF-8 ASCII 
> equivalent string is €. But that's different on Windows, so I looked 
> at the ASCII code points for the three characters. They are 226 130 
> 172. So I tried the following and it reliably rendered the Euro sign 
> on both Mac and Windows (no Linux here for me to try, but it should 
> work there, too.)
>
> set the unicodeText of fld "euro" to \
>  uniencode((numToChar(226) & numToChar(130) & numToChar(172)),"utf8")
>
> That ought to work for you.
>
> Regards,
>
> Devin
>
> Devin Asay
> Humanities Technology and Research Support Center
> Brigham Young University
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list