P
P
PCmist2017-10-16 16:44:35
C++ / C#
PCmist, 2017-10-16 16:44:35

How to convert cp866 to UTF-8 using C++ and Code::Bloсks?

Good afternoon, in programming I understand quite a bit, but now there was a need to create a console application for converting the output of one old program from cp866 to UTF-8. I spent a lot of time in search engines and realized that it is rather difficult to solve this problem "on the forehead", because C ++ is quite low-level and therefore a library for transcoding is needed, icu and libiconv were found, but here are examples of how to use these libraries to create I did not find applications or simply did not understand them. My task, in general, is this - I need an exe (everything happens under Windows), the only function of which is to take text on cp866 and output it in utf-8, the less software you need to install on your PC for it to work and the lighter it is, the better , so I didn't use the compiled libiconv. Can you describe in general terms the options for solving this problem and indicate the solution that you would consider the most correct? If it is possible to point to an example of code that will work on Code::Bloсks + MinGW, I will be just happy.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2017-10-16
@PCmist

If you need to use libraries to a minimum, what's the problem with just taking a symbol table and reading from a file byte by byte, writing to another file the value already corresponding to it in the table.
Just create an array for your transcoder, and that's all read/write from 3rd party libraries.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question