• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unicode and languages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Unicode and languages
      • From: email@hidden
    • Re: Unicode and languages
      • From: Hanaan Rosenthal <email@hidden>
References: 
 >Unicode and languages (From: Hanaan Rosenthal <email@hidden>)

  • Prev by Date: Re: A Faster Script
  • Next by Date: Re: Unicode and languages
  • Previous by thread: Unicode and languages
  • Next by thread: Re: Unicode and languages
  • Index(es):
    • Date
    • Thread