From 4763fca9f82274de22422c6e6b27aa69401454c2 Mon Sep 17 00:00:00 2001 From: archshift Date: Tue, 9 Dec 2014 22:06:53 -0800 Subject: Explicitly specify LE strings to iconv, fixes paths in Steel Diver --- src/common/string_util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 7fb7ede5e..19e162c27 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -528,7 +528,7 @@ std::u16string UTF8ToUTF16(const std::string& input) { std::u16string result; - iconv_t const conv_desc = iconv_open("UTF-16", "UTF-8"); + iconv_t const conv_desc = iconv_open("UTF-16LE", "UTF-8"); if ((iconv_t)(-1) == conv_desc) { ERROR_LOG(COMMON, "Iconv initialization failure [UTF-8]: %s", strerror(errno)); @@ -582,7 +582,7 @@ std::u16string UTF8ToUTF16(const std::string& input) std::string UTF16ToUTF8(const std::u16string& input) { - return CodeToUTF8("UTF-16", input); + return CodeToUTF8("UTF-16LE", input); } std::string CP1252ToUTF8(const std::string& input) -- cgit v1.2.3