From bfdff38d01aae131cefb6d48e23d44b6ae2fa234 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Mon, 29 Jul 2019 20:26:53 +0200 Subject: [PATCH] COMMON: Use backend specific encoding conversion --- common/encoding.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/encoding.cpp b/common/encoding.cpp index 43dce0420a5..b2a704ca67f 100644 --- a/common/encoding.cpp +++ b/common/encoding.cpp @@ -23,6 +23,7 @@ #include "common/encoding.h" #include "common/debug.h" #include "common/textconsole.h" +#include "common/system.h" #include namespace Common { @@ -79,6 +80,11 @@ char *Encoding::doConversion(iconv_t iconvHandle, const String &to, const String #else debug("Iconv is not available"); #endif // USE_ICONV + if (result == nullptr) + result = g_system->convertEncoding(to.c_str(), from.c_str(), string, length); + + if (result == nullptr) + debug("Could not convert from %s to %s using backend specific conversion", from.c_str(), to.c_str()); return result; }