summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs/qicucodec.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-03-17 15:16:44 +0100
committerLars Knoll <lars.knoll@digia.com>2015-03-18 07:34:55 +0000
commit124da60c1de2cc63ad8692bd3a72e8769c6c1e5a (patch)
tree735fb65b8d30116f614e76e896feebff64101084 /src/corelib/codecs/qicucodec.cpp
parentba8c34aaf3683d1502e78ad7a6af700efdeaf0f9 (diff)
Fix support for iso8859-16 when compiling with ICU
ICU doesn't support iso8859-16, so we need to fall back to the Qt codec for this encoding. Task-number: QTBUG-45053 Change-Id: I9754cf098c906fe8a75363a3d090029543cd0e35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/codecs/qicucodec.cpp')
-rw-r--r--src/corelib/codecs/qicucodec.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/codecs/qicucodec.cpp b/src/corelib/codecs/qicucodec.cpp
index 96d62f7084..65cc337708 100644
--- a/src/corelib/codecs/qicucodec.cpp
+++ b/src/corelib/codecs/qicucodec.cpp
@@ -40,6 +40,7 @@
#include "qlatincodec_p.h"
#include "qtsciicodec_p.h"
#include "qisciicodec_p.h"
+#include "qsimplecodec_p.h"
#include "private/qcoreglobaldata_p.h"
#include "qdebug.h"
@@ -364,6 +365,8 @@ static QTextCodec *loadQtCodec(const char *name)
return new QUtf32BECodec;
if (!strcmp(name, "UTF-32LE"))
return new QUtf32LECodec;
+ if (!strcmp(name, "ISO-8859-16") || !strcmp(name, "latin10") || !strcmp(name, "iso-ir-226"))
+ return new QSimpleTextCodec(13 /* == 8859-16*/);
#ifndef QT_NO_CODECS
if (!strcmp(name, "TSCII"))
return new QTsciiCodec;