Re: wchar_t (utf-32) to NSString to utf-16
Re: wchar_t (utf-32) to NSString to utf-16
- Subject: Re: wchar_t (utf-32) to NSString to utf-16
- From: Aki Inoue <email@hidden>
- Date: Tue, 15 Aug 2006 14:02:35 -0700
Converting between the Unicode encoding forms is all algorithmic and
easy to implement.
For pre-10.4 support, your application could carry internal UTF-16 <->
UTF-32 conversion routine.
You can use the sample implementation from Unicode @ http://www.unicode.org/Public/PROGRAMS/CVTUTF/ConvertUTF.c
Alternatively, Mac OS X has another encoding conversion library iconv.
You can have it convert between UTF-16 and UTF-32. man iconv_open
will show you how to use the function.
Aki
On Aug 15, 2006, at 1:47 PM, Michael Marmarou wrote:
This is a good start, but the utf32 support is 10.4 only. I need to
target 10.3 as well.
On 8/15/06, Nick Zitzmann <email@hidden> wrote:
On Aug 15, 2006, at 2:37 PM, Michael Marmarou wrote:
> Is there any way to do this with
> Cocoa?
Sort of.
> If not, does anyone have a suggestion of how to do it?
See CFString.h, specifically the UTF-32 encodings and the
CFStringConvertEncodingToNSStringEncoding() function.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden