boost::unicode::locale_utf_transcoder
// In header: <boost/unicode/utf_codecs.hpp> struct locale_utf_transcoder { // types typedef char input_type; typedef wchar_t output_type; typedef codecvt_out_converter< input_type, output_type >::max_output max_output; // construct/copy/destruct locale_utf_transcoder(std::locale = std::locale(getenv("LANG"))); // public member functions template<typename In, typename Out> Out ltr(In &, In, Out); template<typename In, typename Out> Out rtl(In, In &, Out); std::locale loc; };