![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
李小雷一直在路上
coder & bugger
展开
-
go语言接收c语言消息中文乱码问题
`import:”github.com/axgle/mahonia”enc := mahonia.NewDecoder(“gb18030”) goStr:= enc.ConvertString(cStr) fmt.Println(goStr)`强大的VS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!原创 2016-10-27 21:10:50 · 2410 阅读 · 0 评论 -
C++程序读/写配置文件
#include<iostream>#include<string.h>#include <windows.h>using namespace std;#pragma warning(disable:4996)int main() { //写入配置文件 LPTSTR lpPath = new char[MAX_PATH]; strcpy(lpPath, "C://test.i原创 2016-10-18 20:25:25 · 4075 阅读 · 0 评论 -
C语言接收消息乱码问题
VS的预处理使用的是ANSI编码,而安卓网络数据都是UTF8格式的,这样直接使用printf打印出出来的当然是乱码,所以解决方法就是把UFT8格式的数据转换成ANSI!//UTF8转成Unicode wchar_t * UTF8ToUnicode( const char* str ) { int textlen = 0; wchar_t * result; t转载 2016-10-19 15:56:29 · 1045 阅读 · 0 评论