Re: Unicode in XCode?
Re: Unicode in XCode?
- Subject: Re: Unicode in XCode?
- From: Chris Espinosa <email@hidden>
- Date: Tue, 28 Sep 2004 16:04:07 -0700
On Sep 28, 2004, at 3:34 PM, Matthias Juwan wrote:
I am trying to port a Windows application to Mac OS X using XCode. I have some difficulties with unicode strings (wchar_t*):
First, note that wchar_t is not Unicode. If you want to use Unicode strings in Mac OS X, you should investigate CoreFoundation's CFString type. You can use wchar_t for structured storage of any long, character-like thing you want, but there's no assurance that what you put in there will map at all to Unicode code points. See ISO 2022
- The debugger does not display unicode strings in the variables view. Is there a hidden option somewhere to enable this??
No, there isn't. The gdb debugger that underlies the Xcode debugger doesn't handle UTF-8 or any other Unicode encoding all that well. Again, if you use Mac OS X native types (e.g. CFString) you may get better results.
- The size of wchar_t seems to be 4 Bytes on Mac platform, but I would expect it to be 2 Bytes. Is there an option somewhere to change it to (unsigned) short??
In your target's Target Inspector, Build tab, find the Other C++ Flag setting and set it to "
<x-tad-bigger>-fshort-wchar".
</x-tad-bigger>
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden