Re: Producing Unicode-only characters
Re: Producing Unicode-only characters
- Subject: Re: Producing Unicode-only characters
- From: has <email@hidden>
- Date: Tue, 25 Oct 2005 23:29:24 +0100
Nigel Garvey wrote:
>I can't find a really satisfactory way to get the number from the
>character, though there are two that are much faster than Chris's shell
>script.
For converting between unicode text and corresponding code points you could also use TextCommands, which provides good, non-hacky 'unicode characters' and 'unicode numbers' commands. Nice and fast on Panther and Tiger, though converting big strings is sluggish on Jaguar as older versions of the Apple Event Manager are dreadfully inefficient at packing large AELists. Examples:
- integer<->unicode conversion:
unicode characters integerList
--> unicode text
unicode numbers unicodeText
--> list of integer
- hex<->unicode conversion:
convert to unicode (unpack hexString using hex encoding) from "utf16"
--> Unicode text
pack (convert from unicode unicodeText to "utf16") using hex encoding
--> hex string (includes BOM)
The 'literal' and 'format' commands also allow unicode characters to be specified using %-escaped codes.
HTH
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
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