B
B
bodrich2015-11-30 12:07:44
Python
bodrich, 2015-11-30 12:07:44

How to make third python use ko8-r encoding in c++ project?

There is a project written in C++ using boost. Builds and works under ubuntu.
The python of the second version was connected to the project. Those. some classes and functions were wrapped for python, so that they could then be called from scripts, which, in turn, were called from C ++. The project itself is a small non-commercial game that is maintained purely out of interest for old players. The game engine is 20 years old. The problem is that the engine uses koi8-r. When translating to the third python, there was a problem with utf8. When a module is imported from a python script (which in turn is called from pluses), in which c ++ functions are wrapped, a UnicodeDecodeError occurs. Full traceroute to pastbin. In the scripts themselves, the encoding koi8-r is indicated. Any ideas how to make python accept everything from the engine in koi8-r ?
Question two. As I understand it, when translating a project to utf8, instead of koi8-r, you will have to replace all string and character types with their counterparts in utf8 ? (string -> wstring, char -> wchar)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Tsilyurik, 2015-11-30
@bodrich

As I understand it, when translating a project to utf8, instead of koi8-r, you will have to replace all string and character types with their counterparts in utf8 ? (string -> wstring, char -> wchar)

The questions are stupid... Is
this question related, I assume, to the C++ part?
If yes, then the answer is definitely no , you won't have to replace all "string and character types" .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question