summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-07-30 09:27:19 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-31 11:13:18 +0200
commit4970fa366bcb228c4e52f3cd007220ef24d2c34b (patch)
tree34dc9caaa1fdb2eb2cd4877214b623ee75f991a2 /src/corelib
parent1ee272568b02f2165c8c06e6083e9983e72d9a11 (diff)
Align the CP949 codec name with ICU
It's name is windows-949 according to ICU. Keep CP949 as an alias for compatibility with Qt 4. Change-Id: I115ba2593da6f7b47e25136c3fadb19c7f798ff0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/codecs/qeuckrcodec.cpp13
-rw-r--r--src/corelib/codecs/qeuckrcodec_p.h2
2 files changed, 9 insertions, 6 deletions
diff --git a/src/corelib/codecs/qeuckrcodec.cpp b/src/corelib/codecs/qeuckrcodec.cpp
index 1764d3a6c2..7097636538 100644
--- a/src/corelib/codecs/qeuckrcodec.cpp
+++ b/src/corelib/codecs/qeuckrcodec.cpp
@@ -137,8 +137,6 @@ QString QEucKrCodec::convertToUnicode(const char* chars, int len, ConverterState
QString result;
for (int i=0; i<len; i++) {
uchar ch = chars[i];
- if (ch == 0)
- break;
switch (nbuf) {
case 0:
if (ch < 0x80) {
@@ -3346,7 +3344,14 @@ int QCP949Codec::_mibEnum()
QByteArray QCP949Codec::_name()
{
- return "cp949";
+ return "windows-949";
+}
+
+QList<QByteArray> QCP949Codec::_aliases()
+{
+ QList<QByteArray> aliases;
+ aliases += "CP949";
+ return aliases;
}
/*!
@@ -3448,8 +3453,6 @@ QString QCP949Codec::convertToUnicode(const char* chars, int len, ConverterState
QString result;
for (int i=0; i<len; i++) {
uchar ch = chars[i];
- if (ch == 0)
- break;
switch (nbuf) {
case 0:
if (ch < 0x80) {
diff --git a/src/corelib/codecs/qeuckrcodec_p.h b/src/corelib/codecs/qeuckrcodec_p.h
index 1e8805be99..b4b2f05aa3 100644
--- a/src/corelib/codecs/qeuckrcodec_p.h
+++ b/src/corelib/codecs/qeuckrcodec_p.h
@@ -102,7 +102,7 @@ public:
class QCP949Codec : public QTextCodec {
public:
static QByteArray _name();
- static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
+ static QList<QByteArray> _aliases();
static int _mibEnum();
QByteArray name() const { return _name(); }