Re: wchar_t and NSString
Re: wchar_t and NSString
- Subject: Re: wchar_t and NSString
- From: Clark Cox <email@hidden>
- Date: Tue, 14 Oct 2003 08:59:16 -0400
On Oct 14, 2003, at 07:20, Don Swatman wrote:
Hi All,
I'm using some internal cross platform libraries that use wstring and
wchar_t to store string data. Trouble is on a Mac these are all stored
as 4 byte unicode data. As far as I can see the unicode functions for
NSString all expect 2 byte. This leaves me with having to strip or pad
data before putting it in the NSStrings for display.
The don't use wchar_t. Use your own typedef that is an alias for a two
byte type on various platforms.
So is there any way of putting and getting the NSString data as 4 byte?
Also anyone know how safe it "ignore" the top two bytes? I don't think
it affects too much as it's the more obscure character set code pages
- but I'm not sure.
If you do stick to using a 4 byte type, whatever you do, do not ignore
the top two bytes.
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.