On Sun, Jan 11, 2009 at 1:56 PM, Greg Titus <g...@omnigroup.com> wrote: > Cocoa does use UTF-16 as the encoding for its unichar type in NSStrings, but > the low 7-bits of UTF-16 (characters 0-127) are identical to the ASCII > encodings, so you can cast (char)'7' or (unichar)'7' and get 0x37 either way > and it'll be interpreted as the '7' character in a string as you would > expect.
Doesn't that depend on the byte order? What happens if the string is stored big-endian with a BOM at the beginning, and you go and read out a unichar? --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com