
----- Original Message ----
From: Howard Hinnant <howard.hinnant@gmail.com> To: boost@lists.boost.org Sent: Mon, July 18, 2011 12:23:35 AM Subject: Re: [boost] [locale] Documentation correction
On Jul 17, 2011, at 5:09 PM, Beman Dawes wrote:
Mac OS X is of particular interest because by default locale("") does fall, and the Apple folks have said in the past that they won't fix it. It fails on my Mac mini in the default configuration. Presumably the Darwin regression test machine has something beyond the default configuration.
Going forward libc++ on Mac OS X (http://libcxx.llvm.org/) will support a vast array of locales, including "". This is based on BSD's xlocale API:
Actually it is not BSD's API it is POSIX 2008 API and BSD family of OSes (like FreeBSD) does not support it. Currently only Darwin and Linux support such API (and it is not fully compatible with each other and the standard). BTW GCC's libstdc++ uses Linux's/GNU LibC's newlocale API.
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPa... l
The behavior of "" mimics that of "" passed to newlocale:
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPa... e
Howard
To be honest... I would not be so optimistic about it at all. Collation (strcoll_l/strcoll; strxfrm/strxfrm_l) is broken under under Darwin (even latest) so it would be still limited. Take a look on what Boost.Locale provides over Darwin/Mac OS X - it would be something like this but even less. In any case Boost.Locale provides posix backed that uses this API and you can freely use it on Darwin platform (of course with its limitations) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/