
Hello, friends I am kind of desesperate. I am trying to use a Natural Language Processing application written in C++ that uses libboost on my Mac OS X. The problem is that locales seem to be broken for C++ in darwin. I know that is is (as far as I can tell) libboost fault. If you run the c++ program in attach under Leopard, you get the behavior I paste below. My question is: anybody found a way to make locale working on darwin? Couldn't libboost try to implement an indirection level for mac os X using the C locale API? (not sure if you are interested, just an idea). Please let me know if there is a solution to this problem. Kindest regards, Alberto [ambs@rachmaninoff tmp]$ ./a.out Trying c locales... Succeeded in calling setlocale(LC_ALL, "C") Succeeded in calling setlocale(LC_ALL, "POSIX") Succeeded in calling setlocale(LC_ALL, "en_US") Succeeded in calling setlocale(LC_ALL, "en_US.UTF-8") Succeeded in calling setlocale(LC_ALL, "pl_PL") Succeeded in calling setlocale(LC_ALL, "pl_PL.ISO8859-2") Trying C++ locales... Succeeded ctor for std::locale with "C" Succeeded ctor for std::locale with "POSIX" Failed ctor for std::locale with "en_US": locale::facet::_S_create_c_locale name not valid Failed ctor for std::locale with "en_US.UTF-8": locale::facet::_S_create_c_locale name not valid Failed ctor for std::locale with "pl_PL": locale::facet::_S_create_c_locale name not valid Failed ctor for std::locale with "pl_PL.ISO8859-2": locale::facet::_S_create_c_locale name not valid -- Alberto Simões

On Wednesday, 12 October 2011, Alberto Simões wrote:
My question is: anybody found a way to make locale working on darwin? Couldn't libboost try to implement an indirection level for mac os X using the C locale API? (not sure if you are interested, just an idea).
I'm not sure if this will meet your needs but the upcoming release of boost will include a locale library. You can see the documentation at: http://svn.boost.org/svn/boost/branches/release/libs/locale/doc/html/index.h...

On Sun, Oct 16, 2011 at 11:35 AM, Daniel James
On Wednesday, 12 October 2011, Alberto Simões wrote:
My question is: anybody found a way to make locale working on darwin? Couldn't libboost try to implement an indirection level for mac os X using the C locale API? (not sure if you are interested, just an idea).
I'm not sure if this will meet your needs but the upcoming release of boost will include a locale library. You can see the documentation at: http://svn.boost.org/svn/boost/branches/release/libs/locale/doc/html/index.h...
If it doesn't depend on system locale (didn't have the time to look to it yet) it might be a solution (if I can convince the package developer to port his C++ locale code to boost locale). Thank you. This might be really helpful. Alberto -- Alberto Simões
participants (2)
-
Alberto Simões
-
Daniel James