Elegant way to express constant UTF8 string in script?
Mark Schonewille
m.schonewille at economy-x-talk.com
Mon Jun 30 14:14:04 EDT 2014
Keep in mind that HTML encoded text may not work for some higher-ASCII characters. That's exactly the reason why we have Unicode.
--
Kind regards,
Mark Schonewille
Economy-x-Talk
Http://economy-x-talk.com
Share the clipboard of your computer over a local network with Clipboard Link http://clipboardlink.economy-x-talk.com
Op 30 jun. 2014 om 19:31 heeft Ben Rubinstein <benr_mc at cogapp.com> het volgende geschreven:
> On 30/06/2014 16:18, J. Landman Gay wrote:
>> This is exactly what I've been dealing with for a week. You need two steps : first check the platform and if it's Windows then run macToISO on the string. After that your existing conversion to UTF8 should work.
>
> Aha, good tip, thank you.
>
> On reflection though I think I'm going to adopt a modified version of Peter's suggestion; use HTML entities in the 'constant' string to be unambiguous but readable, passing it through a function called "HTMLtoUTF8" so that bit of the script looks clean - and then do a nasty dirty implementation of that function, that just handles the two entities I currently care about and throws an error if invoked on anything else.
>
> I'm all about the elegance, me.
>
> thanks to all who responded,
>
> Ben
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list