On Tue, Sep 2, 2008 at 10:29 PM, Waqar Malik <[EMAIL PROTECTED]> wrote: > Is there a canonical way to convert wchat_t to NSString?
There isn't, because there is essentially no canonical wchar_t. The only requirements for wchar_t is that it be at least 8 bits wide and that it be compatible with the regular "char" character set, which is to say ASCII-compatible when we're talking about any reasonable modern system. Beyond that, the size and encoding of wchar_t is left entirely up to the compiler. Now, on Mac OS X it's *usually* 32 bits and contains UTF-32, so you can use that information to easily create an NSString from a wchar_t array. But both the encoding and the size could be different depending on a number of factors. Mike _______________________________________________ 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 [EMAIL PROTECTED]