Re: Xcode-users Digest, Vol 7, Issue 153
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