From 4edf35e414aa43fcce8c5a25aff6b1f1ce92244f Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Wed, 14 Aug 2019 21:42:11 -0700 Subject: WIN32: Fix conversion of multibyte encodings. --- backends/platform/sdl/win32/win32.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform/sdl') 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)); -- cgit v1.2.3