5

I can change Project Character Set to Unicode or to Multi-Byte in Microsoft visual studio like what is shown in the picture.

enter image description here

But, is the same thing possible in clion?

aristotll
  • 8,694
  • 6
  • 33
  • 53
ilw
  • 2,499
  • 5
  • 30
  • 54

2 Answers2

1

In CLion, you can change your project / file encoding under:

File->Settings->Editor->File encoding.

CLion change encoding example

For further information, you can read: https://www.jetbrains.com/help/idea/configuring-individual-file-encoding.html

Community
  • 1
  • 1
Idan
  • 333
  • 2
  • 8
1

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.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536