Re: Unicode and languages
Re: Unicode and languages
- Subject: Re: Unicode and languages
- From: Christopher Nebel <email@hidden>
- Date: Wed, 7 Apr 2004 16:14:59 -0700
On Apr 7, 2004, at 9:06 AM, Hanaan Rosenthal wrote:
I need to take information from a cell in Excel (in Unicode) and
determine if
the text is in Japanese or English.
Does anyone know if there's a way to do that?
I know somewhere in the Unicode there's language info, but do I have
access
to it?
Why exactly do you want to do this? Part of the point of Unicode is
that all languages are treated equally -- you just preserve everything.
I suppose you could check for the presence of Japanese characters, but
their presence doesn't guarantee that the text is Japanese (some
strings are valid Japanese and Chinese), nor does their absence
guarantee that the text is English. (Exactly how you'd do this in the
first place is an interesting question, seeing as how there's no
"Unicode number" command.)
If you want to know if the text can be losslessly encoded in MacRoman
vs. MacJapanese, then that's a different question; in that case I'd
suggest attempting to pipe the text through iconv(1) -c and seeing if
it errors.
--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.