CodePudding user response:
https://blog.csdn.net/dyzhen/article/details/46224925https://www.cnblogs.com/findumars/p/7252858.html
CodePudding user response:
MultiByteToWideChar (CP_UTF8, 0, buffer, len, wBuf, len);WideCharToMultiByte (CP_ACP, 0, wBuf, len, szBuf, len, 0, 0).
CodePudding user response:
Char STR []="d ten thousand";//ANSIChar str8 [20]={0};
Int len=9;//
WCHAR wBuf [20]={0};
MultiByteToWideChar (CP_ACP, 0, STR, len, wBuf, len);//ANSI 2 unicode
WideCharToMultiByte (CP_UTF8, 0, wBuf, len, str8, len, 0, 0).//unicode to utf8
//str8="E4 B8 81 E4 B8 80 E4 B8 87"//basically 3 bytes characters
CodePudding user response:
You are misunderstood, what I want is a whole string of a certain period of use utf8 encodingInstead of the whole into utf8 encoding
CodePudding user response:
Split the string, processing finished stitching merger bai again