Re: NSString really Unicode?
Re: NSString really Unicode?
- Subject: Re: NSString really Unicode?
- From: Ondra Cada <email@hidden>
- Date: Fri, 12 Mar 2004 16:53:15 +0100
On Friday, Mar 12, 2004, at 16:38 Europe/Prague, Allan Odgaard wrote:
So after reading the data, but before creating the string, try to
insert this code:
uint16_t* tmp = (uint16_t*)valueBuf;
for(size_t i = 0; i < valueLength/2; i++)
CFSwapInt16(*tmp++);
And then use NSUnicodeStringEncoding as the encoding.
Wouln't it be much better just to prepend the mark word 0xfeff in the
proper endianness? (After all, it *should* be part of the original
Unicode ;))
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.