encodingdev-c++

dev cpp Save and open files with same encoding format


I wrote the code in the visual studio code with utf-8 like this

cout << "你好,世界!" << endl;

But with dev-c++ open the file Chinese will become another way like this

cout << "��ã����磡" << endl;  

Is there any way for them to open the file in the same format?


Solution

  • It seems that currently Dev-C++ does not support UTF-8 encoding, as seen in this ticket from 2016. The discussion there points to this link where someone said in 2013:

    Currently, it is not possible to read or write UTF-8 files using Dev-C++. Sorry about that. At the moment, there are no plans to support non-ANSI encodings.