summaryrefslogtreecommitdiff
path: root/src/common/string_util.cpp
diff options
context:
space:
mode:
authorGravatar Weiyi Wang2018-09-22 00:45:50 -0400
committerGravatar fearlessTobi2018-10-02 16:10:01 +0200
commita4595bb93947c849c8101cac6de29f9f694f26b1 (patch)
tree47d0c79fcc8e3e6382db526e3697d50b1b1fcb10 /src/common/string_util.cpp
parentMerge pull request #1407 from DarkLordZach/dlc (diff)
downloadyuzu-a4595bb93947c849c8101cac6de29f9f694f26b1.tar.gz
yuzu-a4595bb93947c849c8101cac6de29f9f694f26b1.tar.xz
yuzu-a4595bb93947c849c8101cac6de29f9f694f26b1.zip
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
Diffstat (limited to 'src/common/string_util.cpp')
-rw-r--r--src/common/string_util.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index c9a5425a7..b5e28e34f 100644
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -261,14 +261,6 @@ std::wstring UTF8ToUTF16W(const std::string& input) {
261 return CPToUTF16(CP_UTF8, input); 261 return CPToUTF16(CP_UTF8, input);
262} 262}
263 263
264std::string SHIFTJISToUTF8(const std::string& input) {
265 return UTF16ToUTF8(CPToUTF16(932, input));
266}
267
268std::string CP1252ToUTF8(const std::string& input) {
269 return UTF16ToUTF8(CPToUTF16(1252, input));
270}
271
272#else 264#else
273 265
274template <typename T> 266template <typename T>
@@ -368,17 +360,6 @@ std::string UTF16ToUTF8(const std::u16string& input) {
368 return CodeToUTF8("UTF-16LE", input); 360 return CodeToUTF8("UTF-16LE", input);
369} 361}
370 362
371std::string CP1252ToUTF8(const std::string& input) {
372 // return CodeToUTF8("CP1252//TRANSLIT", input);
373 // return CodeToUTF8("CP1252//IGNORE", input);
374 return CodeToUTF8("CP1252", input);
375}
376
377std::string SHIFTJISToUTF8(const std::string& input) {
378 // return CodeToUTF8("CP932", input);
379 return CodeToUTF8("SJIS", input);
380}
381
382#endif 363#endif
383 364
384std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, std::size_t max_len) { 365std::string StringFromFixedZeroTerminatedBuffer(const char* buffer, std::size_t max_len) {