aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-08-14 21:42:11 -0700
committerFilippos Karapetis2019-08-24 18:12:45 +0300
commit4edf35e414aa43fcce8c5a25aff6b1f1ce92244f (patch)
treebf6a55d91be851c0c067493bdab3754397fd1c4e /backends/platform
parent41d3a70c5848267916d01c26b99b4b2991ae1d0e (diff)
downloadscummvm-rg350-4edf35e414aa43fcce8c5a25aff6b1f1ce92244f.tar.gz
scummvm-rg350-4edf35e414aa43fcce8c5a25aff6b1f1ce92244f.tar.bz2
scummvm-rg350-4edf35e414aa43fcce8c5a25aff6b1f1ce92244f.zip
WIN32: Fix conversion of multibyte encodings.
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/sdl/win32/win32.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp
index d3e8c4d1d5..aa83a37df0 100644
--- a/backends/platform/sdl/win32/win32.cpp
+++ b/backends/platform/sdl/win32/win32.cpp
@@ -419,7 +419,7 @@ char *OSystem_Win32::convertEncoding(const char* to, const char *from, const cha
}
WCHAR *tmpStr;
- if (Common::String(from).equalsIgnoreCase("utf-16")) {
+ if (Common::String(from).hasPrefixIgnoreCase("utf-16")) {
// Allocate space for string and 2 ending zeros
tmpStr = (WCHAR *) calloc(sizeof(char), length + 2);
if (!tmpStr) {
@@ -431,7 +431,7 @@ char *OSystem_Win32::convertEncoding(const char* to, const char *from, const cha
tmpStr = Win32::ansiToUnicode(string, Win32::getCodePageId(from));
}
- if (Common::String(to).equalsIgnoreCase("utf-16"))
+ if (Common::String(to).hasPrefixIgnoreCase("utf-16"))
return (char *) tmpStr;
else {
result = Win32::unicodeToAnsi(tmpStr, Win32::getCodePageId(to));