Re: Producing Unicode-only characters
Re: Producing Unicode-only characters
- Subject: Re: Producing Unicode-only characters
- From: Dave Lyons <email@hidden>
- Date: Tue, 25 Oct 2005 19:22:20 -0700
On Oct 25, 2005, at 3:01 PM, Nigel Garvey wrote:
run script "«data utxt3048»"
... which of course makes a nice basis for a Unicode character
handler:
on unicodeCharacter(n)
run script "«data utxt" & {n div 4096, n mod 4096 div 256, n
mod 256
div 16, n mod 16} & "»"
end unicodeCharacter
unicodeCharacter(12360)
Neat...but for anyone wanting to use that for arbitrary characters,
note that as written it only works if each of the 4 hex digits in the
character code is from 0 to 9. Any digit A through F wreaks havoc.
(For example, 12367 turns into «data utxt30415» rather than «data
utxt304F».)
Cheers,
--Dave
_______________________________________________
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