Re: [boost] [Locale] translate() couples key and output character widths
That was a loooooong and painful discussion during the boost.locale review.
Such a change was asked by the reviewers that wanted to be able to use
wide strings as keys. For example
translate(L"© All Rights Are Reserved")
Where "©" is non-ASCII character.
This change was mostly required to support non-ascii characters in keys.
To be honest I was strongly against the change but finally had to accept it.
See: http://thread.gmane.org/gmane.comp.lib.boost.devel/218543
Also you can search boost lists the locale review comments...
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
--------------------------------------------
On Fri, 12/20/13, Alexander Lamaison
Artyom Beilis
That was a loooooong and painful discussion during the boost.locale review.
Such a change was asked by the reviewers that wanted to be able to use wide strings as keys. For example
translate(L"© All Rights Are Reserved")
Where "©" is non-ASCII character.
This change was mostly required to support non-ascii characters in keys. To be honest I was strongly against the change but finally had to accept it.
See: http://thread.gmane.org/gmane.comp.lib.boost.devel/218543
Also you can search boost lists the locale review comments...
I remember the discussion and I understand why `message` was templated to
allow wchar_t keys. But what I don't understand is why the templated
`basic_message` lost one of its coersion (conversion) methods in the
process?
In other words, why these don't work:
std::wstring(boost::locale::basic_message<char>("blah"));
std::string(boost::locale::basic_message
participants (2)
-
Alexander Lamaison
-
Artyom Beilis