Re: wchar_t* turned into a char*?
Re: wchar_t* turned into a char*?
- Subject: Re: wchar_t* turned into a char*?
- From: Marshall Clow <email@hidden>
- Date: Tue, 27 Jul 2004 17:22:38 -0700
At 5:59 PM -0600 7/27/04, Mark Morrill wrote:
Yep. I know wchar_t is implementation defined. Unix world general takes
it as 32 bits. Windows takes it as 16 bits. Carbon/Foundation is using
16 bits.
For what it's worth, CoreFoundation is using a 16 bit wchar_t.
CFString uses UTF-16 internally, but that doesn't have anything to do
with wchar_t.
GCC defines wchar_t as 32 bits. Heck, gcc defines bool as 32 bits.
CodeWarrior defines wchar_t as 16 bits.
I've done a but more poking about. I'm using Xcode on Mac OS X 10.3.4,
and pretty sure I'm using gcc 3.3.
You probably are.
When the compiler comes across the following (I'm using UTF-8 encoded
source).
wchar_t* str = L"三個子"; // <- 3 characters
That didn't get here unmangled, so I can't say if gcc is handling it
correctly :-(
--
-- Marshall
Marshall Clow Idio Software <mailto:email@hidden>
It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.