mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 18:12:44 -06:00
string_util: remove ShiftJIS/CP1252 conversion function
We always use unicode internally. Any dirty work of conversion with other codec should be handled by frontend framework (Qt). Further more, ShiftJIS/CP1252 are not special (they are not code set used by 3ds, or any guest/host dependencies we have), so there is no reason to specifically include them
This commit is contained in:
parent
d1a576eb14
commit
16b22128bf
2 changed files with 0 additions and 22 deletions
|
@ -257,14 +257,6 @@ std::wstring UTF8ToUTF16W(const std::string& input) {
|
||||||
return CPToUTF16(CP_UTF8, input);
|
return CPToUTF16(CP_UTF8, input);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SHIFTJISToUTF8(const std::string& input) {
|
|
||||||
return UTF16ToUTF8(CPToUTF16(932, input));
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string CP1252ToUTF8(const std::string& input) {
|
|
||||||
return UTF16ToUTF8(CPToUTF16(1252, input));
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -364,17 +356,6 @@ std::string UTF16ToUTF8(const std::u16string& input) {
|
||||||
return CodeToUTF8("UTF-16LE", input);
|
return CodeToUTF8("UTF-16LE", input);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CP1252ToUTF8(const std::string& input) {
|
|
||||||
// return CodeToUTF8("CP1252//TRANSLIT", input);
|
|
||||||
// return CodeToUTF8("CP1252//IGNORE", input);
|
|
||||||
return CodeToUTF8("CP1252", input);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string SHIFTJISToUTF8(const std::string& input) {
|
|
||||||
// return CodeToUTF8("CP932", input);
|
|
||||||
return CodeToUTF8("SJIS", input);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, std::size_t max_len) {
|
std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, std::size_t max_len) {
|
||||||
|
|
|
@ -70,9 +70,6 @@ std::string ReplaceAll(std::string result, const std::string& src, const std::st
|
||||||
std::string UTF16ToUTF8(const std::u16string& input);
|
std::string UTF16ToUTF8(const std::u16string& input);
|
||||||
std::u16string UTF8ToUTF16(const std::string& input);
|
std::u16string UTF8ToUTF16(const std::string& input);
|
||||||
|
|
||||||
std::string CP1252ToUTF8(const std::string& str);
|
|
||||||
std::string SHIFTJISToUTF8(const std::string& str);
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
std::string UTF16ToUTF8(const std::wstring& input);
|
std::string UTF16ToUTF8(const std::wstring& input);
|
||||||
std::wstring UTF8ToUTF16W(const std::string& str);
|
std::wstring UTF8ToUTF16W(const std::string& str);
|
||||||
|
|
Loading…
Reference in a new issue