Answer the question
In order to leave comments, you need to log in
How to convert KOI8 to UTF in C/C++?
From other encodings (CP1251 etc) I convert with boost::locale::conv::to_utf .
For such encodings, boost recommends boost::locale::util::base_converter ( here ).
I still haven't figured out how to use it. There is a short help on converting to unicode, but I don't understand how to work with it.
Perhaps there are other options (without boost), but I would not want to pull another unwieldy library.
Help me please!
Answer the question
In order to leave comments, you need to log in
Why would you even use util. Use exactly to_utf, doesn't boost support koi8? See if the locale you need is in the system, if not, you need to generate it. Why do you not like the option
generator gen;
std::locale loc= gen().generate("ru_RU.koi8-r");
std::string utf8_string = to_utf<char>(koi8_string, loc);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question