
18 Feb
2009
18 Feb
'09
5:51 a.m.
I think it would be sufficient to rely on the locale to make decisions about the char nature. I have solved this particular task in Boost.Log. You may find it in boost/log/detail/code_conversion.hpp and libs/log/src/code_conversion.cpp, if you're interested.
Andrey, thank you for the pointer. I'll definitely have a look. I am somewhat cautious though due to past experience. Back then we had OpenLDAP on Windows. That is, for all internal purposes we used the platform's coding -- MBCS. However, for anything OpenLDAP-related we had to handle UTF8 as heavily. That is we had to have explicit UTF8<->MBCS<->WIDE and could not rely on any support from locale. V.