Skip navigation.
 
mlwchar_t (utf-32) to NSString to utf-16
FROM : Michael Marmarou
DATE : Tue Aug 15 22:37:07 2006

I don't see any documentation anywhere for converting a utf-32
(wchar_t*) string into an NSString or at least going to utf-16.  There
are a couple posts that just suggest not using wchar_t, but that is
impossible for me.

I don't need to perform any operations on the resulting string, it
simply needs to go from utf-32 to utf-16.  An output of a unsigned
short * would be fine as well.  Is there any way to do this with
Cocoa? If not, does anyone have a suggestion of how to do it?

Thanks
Mike

Related mailsAuthorDate
mlwchar_t (utf-32) to NSString to utf-16 Michael Marmarou Aug 15, 22:37
mlRe: wchar_t (utf-32) to NSString to utf-16 Nick Zitzmann Aug 15, 22:43
mlRe: Re: wchar_t (utf-32) to NSString to utf-16 Michael Marmarou Aug 15, 22:47
mlRe: wchar_t (utf-32) to NSString to utf-16 Ricky Sharp Aug 15, 22:57
mlRe: wchar_t (utf-32) to NSString to utf-16 Aki Inoue Aug 15, 23:02