You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
429 B
C++

#pragma once
#include <string>
#include <iostream>
// UTF8、UCS16、GB2312 编码互相转换
OT_NAMESPACE_BEGIN
std::string WideToGB2312(const wchar_t* s);
std::wstring GB2312ToWide(const char* s);
std::string WideToUTF8(const std::wstring& s);
std::wstring UTF8ToWide(const std::string& s);
std::string UTF8ToGB2312(const char* s);
std::string GB2312ToUTF8(const char* s);
OT_NAMESPACE_END