If the data is in-process UTF16 (i.e. host-endian UTF-16 without BOM), you 
should be using -initWithCharacters:length: instead.

Aki

On 2011/02/13, at 15:50, Kyle Sluder wrote:

> On Sun, Feb 13, 2011 at 3:17 PM, Todd Heberlein <[email protected]> 
> wrote:
>> [[NSString alloc] initWithBytes:byte_stream length:len 
>> encoding:NSUTF16LittleEndianStringEncoding]
> 
> Just make sure you're guaranteed to get little-endian UTF-16 from your
> C++ string. :)
> 
> --Kyle Sluder
> _______________________________________________
> 
> Cocoa-dev mailing list ([email protected])
> 
> 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/aki%40apple.com
> 
> This email sent to [email protected]

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to