| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Well, the stream you have looks like plain old UCS-2, that is, NSUnicodeStringEncoding. One thing that looks wrong is that the byte order mark (BOM) seems reversed --- That is, it implies the characters are stored big endian, but they really are little endian. BOM is supposed to be 0xFEFF, which implies the chars are 0xB930, 0xC830, etc, which seem fishy (they are all over the map). If you instead reverse them, you get the much more reasonable 0x30B9, 0x30C8, etc. Doing this, and loading the resulting byte stream into TextEdit, I get a reasonable looking Japanese string (I have no idea what it says though). In addition, [NSString initWithContentsOfFile:] should just read this fine. No need to use TEC..
.
Ali
| References: | |
| >Re: Displaying Unicode (From: Ali Ozer <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.