• 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: "email@hidden" <email@hidden>
  • Date: Mon, 12 Apr 2010 23:15:09 +0100

> I'm still baffled by the need for a locale. I thought the whole point of UTF-32 (which is what wchar_t strings boil down to) was to get rid of locale issues. I think I'll raise a bug on this one.

I agree about the locale thing; I was seriously put out when I tripped over it, but if you google the *Linux* swprintf man page it does state that wide characters will be interpreted by locale, although this is clearly 100% undesirable for 99.99% of developers.  OS X seems to have inherited this behaviour (via the GNU C library, presumably) but the OS X man page is a direct copy of the corresponding POSIX page, and says nothing on the matter.

http://www.opengroup.org/onlinepubs/9699919799/functions/swprintf.html

It seems to me that someone at glibc HQ messed up here but I doubt if it will get fixed now as there are no doubt programs out there that rely on the existing behaviour.  Yuk, sloppy work.

Just for completeness, mapping between UTF-16 strings and Unicode, although, sadly, no longer a 1:1 affair, does not depend on locale.  Look up surrogate pairs if you want to know more, but, essentially, these add mappings for a million new code points which everyone fervently hopes is all we will ever need.

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

  • Follow-Ups:
    • Re: Xcode-users Digest, Vol 7, Issue 153
      • From: "Clark S. Cox III" <email@hidden>
    • wchar_t locale (was: Re: Xcode-users Digest, Vol 7, Issue 153)
      • From: Jonas Maebe <email@hidden>
  • Prev by Date: Build date time and version in file to use in a label
  • Next by Date: wchar_t locale (was: Re: Xcode-users Digest, Vol 7, Issue 153)
  • Previous by thread: Re: Xcode-users Digest, Vol 7, Issue 153
  • Next by thread: wchar_t locale (was: Re: Xcode-users Digest, Vol 7, Issue 153)
  • Index(es):
    • Date
    • Thread