diff options
Diffstat (limited to '')
| -rw-r--r-- | src/common/string_util.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common/string_util.h b/src/common/string_util.h index a41ccc691..787a5663f 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h | |||
| @@ -89,20 +89,22 @@ std::string ReplaceAll(std::string result, const std::string& src, const std::st | |||
| 89 | std::string UriDecode(const std::string & sSrc); | 89 | std::string UriDecode(const std::string & sSrc); |
| 90 | std::string UriEncode(const std::string & sSrc); | 90 | std::string UriEncode(const std::string & sSrc); |
| 91 | 91 | ||
| 92 | std::string UTF16ToUTF8(const std::u16string& input); | ||
| 93 | std::u16string UTF8ToUTF16(const std::string& input); | ||
| 94 | |||
| 92 | std::string CP1252ToUTF8(const std::string& str); | 95 | std::string CP1252ToUTF8(const std::string& str); |
| 93 | std::string SHIFTJISToUTF8(const std::string& str); | 96 | std::string SHIFTJISToUTF8(const std::string& str); |
| 94 | std::string UTF16ToUTF8(const std::wstring& str); | ||
| 95 | 97 | ||
| 96 | #ifdef _WIN32 | 98 | #ifdef _WIN32 |
| 97 | 99 | ||
| 98 | std::wstring UTF8ToUTF16(const std::string& str); | 100 | std::wstring UTF8ToUTF16W(const std::string& str); |
| 99 | 101 | ||
| 100 | #ifdef _UNICODE | 102 | #ifdef _UNICODE |
| 101 | inline std::string TStrToUTF8(const std::wstring& str) | 103 | inline std::string TStrToUTF8(const std::wstring& str) |
| 102 | { return UTF16ToUTF8(str); } | 104 | { return UTF16ToUTF8(str); } |
| 103 | 105 | ||
| 104 | inline std::wstring UTF8ToTStr(const std::string& str) | 106 | inline std::wstring UTF8ToTStr(const std::string& str) |
| 105 | { return UTF8ToUTF16(str); } | 107 | { return UTF8ToUTF16W(str); } |
| 106 | #else | 108 | #else |
| 107 | inline std::string TStrToUTF8(const std::string& str) | 109 | inline std::string TStrToUTF8(const std::string& str) |
| 108 | { return str; } | 110 | { return str; } |