Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text interpretation/reading question



On Feb 22, 2007, at 3:53 PM, Andreas Kiel wrote:

First of all many thanks to all who invested the time to read and look thru all the things I supplied (and asked) and additionally also took the time to investigate further. This was a big help.

I meanwhile got the error fixed which made the AS script go slow, but I'm still struggling to set up a conversion from ISO 6937 to Unicode/ASCII since I only got a few samples of how the text should look like (the customer don't know either). I didn't find a rule yet, so it's some kind of trial and error.

Again thanks for the tremendous input - any further ideas are appreciate as well ;-)

The quick and dirty way to convert ISO 6937 to Unicode (based on a quick look at the Wikipedia article) looks like it's to simply take any byte in the 0xC1-0xCF range, turn it into the appropriate Unicode combining mark (for example, 0xC1 would become U+0300, a grave mark) and emit that *after* the following character. Otherwise, just copy the value as is, since ISO 646 is isomorphic to Unicode. Presto, canonically decomposed Unicode. (Details of which UTF to emit and how are left as an exercise for the reader.)



--Chris Nebel AppleScript Engineering

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden
References: 
 >Re: Text interpretation/reading question (From: Hagimeno <email@hidden>)
 >Re: Text interpretation/reading question (From: Andreas Kiel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.