• 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: Xcode-users Digest, Vol 7, Issue 153
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode-users Digest, Vol 7, Issue 153


  • Subject: Re: Xcode-users Digest, Vol 7, Issue 153
  • From: "Paul Sanders" <email@hidden>
  • Date: Wed, 14 Apr 2010 11:50:52 +0100

> Unfortunately, using that flag [-fshort-wchar] makes your code binary-incompatible with libraries that use wchar_t and were not compiled with that flag. That's why I was told we can't use it in Chromium.
 
I was thinking about this, and I realise that you (and indeed I) could use that flag if one controls all the relevant libraries and can compile them all in the same way.  And in fact it's only libaries that use wchar_t in their API's that would need to be recompiled with this flag.
 
What's missing is support for 'wchar_t_16' in the runtime library, and it is not so hard to provide replacements for that yourself.  Had I known about this flag when I was putting my app and libraries together I might have used it, but everything is working fine now with wchar_t_32 so I will most likely stick with what I've got.
 
Reminder of link to that 'printf family' source code I mentioned a while back: http://hte.sourceforge.net/doxygenized-0.8.0pre1/snprintf_8cc-source.html.  Other than that, things like wstrcpy. wcstok, wcschr, ... are all simple enough to write.  I don't know about you, but I don't use scanf.
 
There's nothing wrong with wchar_t as a concept.  You can't beat being able to iterate through and index into a string of fixed-size elements for speed and convenience.  It's the runtime library support that's a bit of a mess.  And those surrogate pairs, of course.
 
Paul Sanders.
 
 _______________________________________________
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

  • Prev by Date: Re: Remote debugging using Xcode
  • Next by Date: Re: swprintf fails with extended character codes
  • Previous by thread: Re: Xcode-users Digest, Vol 7, Issue 153
  • Next by thread: Build date time and version in file to use in a label
  • Index(es):
    • Date
    • Thread