概述
谢_待雪*初平、使用VS2019编写Unicode转换成中文,即:UnicodeToChinese
输入:u5f85u96eau521du5e73u548cu671bu65adu79cbu9ad8
输出:待雪初平和望断秋高
C++控制台项目:Unicode和中文的相互转换——下载地址:
https://download.csdn.net/download/wangduanqiugao/11924338
VS2019的C++控制台项目(x64x86DebugRelease已编译)
#include <atlstr.h>
#include <string.h>
#include <iostream>
using namespace std;
bool UnicodeToChinese(string str, CString&
cstr)
{
int i = 0;
int j = 0;
int len = 0;
len = str.length();
if (len <= 0)
{
return false;
}
int nValue = 0;
WCHAR * pWchar;
wchar_t* szHex;
char strchar[6] = { '0','x','