Dev-Cpp
Dev-Cpp copied to clipboard
Problem resulted in printing chinese.
This software is one of the most fanstastic IDE i've ever used. But,in C++,because of encoding method,i cannot output Chinese. such as
#include<iostream>
int main{std::cout<<“你好世界”;}
and wrong things are outputed.This is a little problem,also exits in many other IDEs.But in order to make devcpp perfect,i hope this can be fixed
Is the last line here correct?

I tried the fmt library : https://github.com/fmtlib/fmt
#include <iostream>
#include <windows.h>
#define FMT_HEADER_ONLY
#include "fmt\core.h"
int main() {
SetConsoleOutputCP(936);
std::cout << "aa èéøÞǽлљΣæča \n - \n" << "bb 你好世界 \n - \n";
fmt::print("123 ");
fmt::print("èéøÞǽлљΣæča \n\n");
fmt::print("123 你好世界");
getchar();
return 0;
}
It works in the window the IDE creates. Or in a DOS console if you precede with "CHCP 936".