Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'AppleScript: Using Unicode the Sneaky Way' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
AppleScript: Using Unicode the Sneaky Way
Authored by: hynek on May 24, '10 11:37:02PM
Since AppleScript 2.0 all text is Unicode.
So if you don't want to write your text in hex like this:
set myText to źdata utxt00680065006C006C006F╗ as Unicode text

Try this for special characters:
set myText to character id 37329 & " <-> " & id of "金"

[ Reply to This | # ]
AppleScript: Using Unicode the Sneaky Way
Authored by: renaultssoftware on May 27, '10 04:16:58AM

I know you can do that. But this is the "sneaky way" I use because it's a bit time-consuming to hunt down characters in the Char Palette. Besides, I can concatenate text in AppleScript, and do all that wonderful stuff in text editors. A Unicode geek would like this hint a lot, I can tell.



[ Reply to This | # ]
AppleScript: Using Unicode the Sneaky Way
Authored by: mantrid on May 27, '10 07:44:34AM

What exactly do you mean by "I found an intersting way"? Unicode savvy AppleScripters have been using this trick (within its limitations) for a while, in particular before the improved unicode support in Leopard's AppleScript so if you "found" it on a web page, you should credit the source. If you worked it out yourself, a quick search would have told you that the method is already known, which makes "I found" a little presumptuous.



[ Reply to This | # ]