On Feb 11, 2011, at 11:10 AM, Kyle Sluder wrote:

> NSUnicodeStringEncoding is an alias for NSUTF16StringEncoding. You're
> best off getting UTF16 from your C++ string and explicitly using the
> NSUTF16StringEncoding constant when creating your NSString. Since
> UTF16 is the canonical representation of strings, this will result in
> the fewest conversions, and using the explicit UTF16 constant rather
> than the equivalent NSUnicodeStringEncoding will make your code
> clearer.
> 
> --Kyle Sluder

Thanks!

[[NSString alloc] initWithBytes:byte_stream length:len 
encoding:NSUTF16LittleEndianStringEncoding]

worked for me.

Todd

_______________________________________________

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