K
K
K0lejnik2016-07-31 14:54:42
visual studio
K0lejnik, 2016-07-31 14:54:42

How to correctly compile Cyrillic in C++ visual studio 2015 sources?

There are Cyrillic characters in the C++ source code that need to be output to the console. The source code itself is saved in utf-8 encoding. When compiling, it gives the following warning: warning C4566: the character represented by the universal character name "\u0435" cannot be represented in the current code page (1252
) system coding). Supposedly I found a solution (maybe it helped someone) #pragma execution_character_set("utf-8") we tell compilers not to convert it to sys. encoding. Warnings are gone, but Cyrillic is displayed incorrectly. Can anyone help solve this issue?
If it will be useful (windows 10 32 bit) English,

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2016-07-31
@xmoonlight

write the character normally as is, not in code.
everything is already in UTF-8.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question