COMMON: Use backend specific encoding conversion
This commit is contained in:
parent
d6d6ac1823
commit
bfdff38d01
1 changed files with 6 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
||||||
#include "common/encoding.h"
|
#include "common/encoding.h"
|
||||||
#include "common/debug.h"
|
#include "common/debug.h"
|
||||||
#include "common/textconsole.h"
|
#include "common/textconsole.h"
|
||||||
|
#include "common/system.h"
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
@ -79,6 +80,11 @@ char *Encoding::doConversion(iconv_t iconvHandle, const String &to, const String
|
||||||
#else
|
#else
|
||||||
debug("Iconv is not available");
|
debug("Iconv is not available");
|
||||||
#endif // USE_ICONV
|
#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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue