cstring to utf8
Posted xzh1993
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cstring to utf8相关的知识,希望对你有一定的参考价值。
- char* UnicodeToUtf8(CString unicode)
- {
- int len;
- len = WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR)unicode, -1, NULL, 0, NULL, NULL);
- char *szUtf8=new char[len + 1];
- memset(szUtf8, 0, len * 2 + 2);
- WideCharToMultiByte (CP_UTF8, 0, (LPCWSTR)unicode, -1, szUtf8, len, NULL,NULL);
- return szUtf8;
- }
以上是关于cstring to utf8的主要内容,如果未能解决你的问题,请参考以下文章
iOS NetworkExtension let tunFd = self?.packetFlow.value(forKeyPath: “socket.fileDescriptor“) as! Int
iOS NetworkExtension let tunFd = self?.packetFlow.value(forKeyPath: “socket.fileDescriptor“) as! Int
iOS NetworkExtension let tunFd = self?.packetFlow.value(forKeyPath: “socket.fileDescriptor“) as! Int
iOS NetworkExtension let tunFd = self?.packetFlow.value(forKeyPath: “socket.fileDescriptor“) as! Int