I can change Project Character Set to Unicode or to Multi-Byte in Microsoft visual studio like what is shown in the picture.
But, is the same thing possible in clion?
I can change Project Character Set to Unicode or to Multi-Byte in Microsoft visual studio like what is shown in the picture.
But, is the same thing possible in clion?
In CLion, you can change your project / file encoding under:
File->Settings->Editor->File encoding.
For further information, you can read: https://www.jetbrains.com/help/idea/configuring-individual-file-encoding.html
All that this setting does is automatically set a preprocessor symbol. Either /D UNICODE
or /D _MBCS
or nothing.
It is the kind of setting you decide on very early and never change again. With a bias towards Unicode, it doesn't make much sense to write C++ code and intentionally slow it down by using the Ansi adapter functions. Visual Studio basically only has this setting because there are so many codebases out there that started life 20+ years ago, back when character sets still seemed a practical idea and Win9x was still popular. Those days are over.