
The latest version of Boost.Locale is doing something wierd to stream manipulators. For example, the following code should print 63:2c:7f. If you uncomment the line that sets the global locale to use a boost::locale instance, it prints 990:440:127. It seems to be ignoring the std::hex manipulator and doing something strange with std::width. #include <iomanip> #include <iostream> #include <sstream> #include <string> #include <vector> #include <boost/locale.hpp> std::string hexify() { std::ostringstream hex_hash; hex_hash << std::hex << std::setfill('0'); unsigned int data[] = {99, 44, 127}; for(size_t i = 0; i < 3; ++i) { if (!hex_hash.str().empty()) hex_hash << ":"; hex_hash << std::setw(2) << data[i]; } return hex_hash.str(); } int main() { using boost::locale::generator; generator gen; //std::locale::global(gen("")); std::cout << hexify() << std::endl; } This is on Windows 7 with Boost.Locale compiled to only use the Win32 backend. Alex -- Easy SFTP for Windows Explorer (http://www.swish-sftp.org)

The latest version of Boost.Locale is doing something wierd to stream manipulators. For example, the following code should print 63:2c:7f. If you uncomment the line that sets the global locale to use a boost::locale instance, it prints 990:440:127. It seems to be ignoring the std::hex manipulator and doing something strange with std::width.
Thanks! You are right, I had fixed it in trunk, you are wellocome to use the latest version from SVN. https://cppcms.svn.sourceforge.net/svnroot/cppcms/boost_locale/trunk Artyom
participants (2)
-
Alexander Lamaison
-
Artyom