Re: Producing Unicode-only characters
Re: Producing Unicode-only characters
- Subject: Re: Producing Unicode-only characters
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 26 Oct 2005 10:58:06 -0400
On 10/26/05,
Nigel Garvey <
email@hidden> wrote:
Mmm. That's true. But then _all_ Unicode numbers are less than 65536 to
AppleScript:
Not true. It's just that it uses UTF-16, which means that numbers
higher than 65536 have to be encoded using surrogate pairs.
-- "CJK UNIFIED IDEOGRAPH-28CCA"
set a to «data utxt00028CCA» as Unicode text -- 167114
count a
--> 2 -- two characters
Right, but in UTF-16, the character U+28CCA is encoded as the two code points D863 + DCCA:
count «data utxtD863DCCA»
--> 1 -- one character, UTF-16 encoded.
See my previous message for how to handle this properly.
--
Mark J. Reed <
email@hidden>
_______________________________________________
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