C++ 控制台c+中的wchar_t字符输出不正确+;
我尝试将wchar__t字符按其整数索引打印到控制台,但其中一些字符显示为空矩形,而对于其中一些字符(例如汉字),效果很好 我有以下代码:C++ 控制台c+中的wchar_t字符输出不正确+;,c++,unicode,console,wchar-t,C++,Unicode,Console,Wchar T,我尝试将wchar__t字符按其整数索引打印到控制台,但其中一些字符显示为空矩形,而对于其中一些字符(例如汉字),效果很好 我有以下代码: #include <iostream> #include <iomanip> #include <fcntl.h> #include <io.h> #include <conio.h> #include <codecvt> #include <cmath> using na
#include <iostream>
#include <iomanip>
#include <fcntl.h>
#include <io.h>
#include <conio.h>
#include <codecvt>
#include <cmath>
using namespace std;
int main() {
_setmode(_fileno(stdout), _O_U16TEXT);
wcout << L"Example 1: " << wchar_t(25500) << "\n";
wcout << L"Example 2: " << wchar_t(831) << "\n";
return 0;
};
#包括
#包括
#包括
#包括
#包括
#包括
#包括
使用名称空间std;
int main(){
_setmode(_fileno(stdout),_O_16text);
wcout并非所有字体都包含所有字形。您可以使用字符映射实用程序(开始>Windows附件)签出正在使用的字体.conio.h
不是标准标题。请相应地标记您的问题。我在该列表中没有看到MS哥特式。@ÖTiib我看不到控制台中有任何可用的字体。您使用的是什么窗口?Mine windows 10命令提示符/properties/font似乎首选了console、Courier New和Liberation Mono。