Producing Unicode-only characters [was: Finding \t, \r, \n reliably]
Producing Unicode-only characters [was: Finding \t, \r, \n reliably]
- Subject: Producing Unicode-only characters [was: Finding \t, \r, \n reliably]
- From: kai <email@hidden>
- Date: Tue, 25 Oct 2005 01:42:14 +0100
On 24 Oct 2005, at 17:42, Christopher Nebel wrote:
There is no official way to convert between Unicode code points and
characters in AppleScript, though there are workarounds using the
shell or an intermediate file. For example:
set e to do shell script "perl -e 'print \"\\x{3048}\"'" -->
hiragana letter e.
do shell script "perl -e 'use utf8; print ord(\"" & e & "\")'"
--> 12360
One method that I've been using to produce Unicode-only characters is:
---------------
«data utxt3048» as Unicode text
---------------
While this seems to be substantially faster than using a shell
script, I'm just wondering if there's a potential downside...
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden