• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unicode in XCode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Unicode in XCode?
      • From: Matthias Juwan <email@hidden>
References: 
 >Unicode in XCode? (From: Matthias Juwan <email@hidden>)

  • Prev by Date: Re: Unicode in XCode?
  • Next by Date: Is Xcode C++ non-standard?
  • Previous by thread: Re: Unicode in XCode?
  • Next by thread: Re: Unicode in XCode?
  • Index(es):
    • Date
    • Thread