Commit 6e8259dd authored by ap@webkit.org's avatar ap@webkit.org

Reviewed by Darin.

        <rdar://problem/5841351> Turkish ISO 8859-9 encoding should be treated as windows-1254

        Match IE and upgrade ISO-8859-9 to windows-1254, which is its strict superset.

        Test: fast/encoding/char-decoding.html

        * platform/text/TextCodecICU.cpp:
        (WebCore::TextCodecICU::registerExtendedEncodingNames): Register the standard name
        unconditionally. Previously, we registered windows-949-2000 as a special case that lacked 
        an IANA standard name, and got away with not registering GBK because it happened
        to be reported by ICU normally earlier than any encoding upgraded to it.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 94dcef7f
2008-05-13 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Darin.
<rdar://problem/5841351> Turkish ISO 8859-9 encoding should be treated as CP1254
* fast/encoding/char-decoding-expected.txt:
* fast/encoding/char-decoding.html:
Added tests for Turkish encodings.
2008-05-12 Adam Roben <aroben@apple.com>
Test that NPN_PostURL works correctly
......@@ -29,7 +29,13 @@ PASS decode('windows-949', '%A2%41') is 'U+C910'
PASS decode('iso-ir-149', '%A2%41') is 'U+C910'
PASS decode('KS_C_5601-1987', '%A2%41') is 'U+C910'
PASS decode('KS_C_5601-1989', '%A2%41') is 'U+C910'
PASS decode('iso-8859-9', '%80') is 'U+20AC'
PASS decode('iso-8859-9', '%9F') is 'U+0178'
PASS decode('iso-8859-9', '%FD') is 'U+0131'
PASS decode('latin5', '%80') is 'U+20AC'
PASS decode('latin5', '%9F') is 'U+0178'
PASS decode('latin5', '%FD') is 'U+0131'
PASS decode('windows-1254', '%80') is 'U+20AC'
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -66,7 +66,15 @@ testDecode('windows-949', '%A2%41', 'U+C910');
testDecode('iso-ir-149', '%A2%41', 'U+C910');
testDecode('KS_C_5601-1987', '%A2%41', 'U+C910');
testDecode('KS_C_5601-1989', '%A2%41', 'U+C910');
debug('');
// Test that ISO-8859-9 (Turkish) is upgraded to windows-1254 with Euro symbol.
testDecode('iso-8859-9', '%80', 'U+20AC');
testDecode('iso-8859-9', '%9F', 'U+0178');
testDecode('iso-8859-9', '%FD', 'U+0131');
testDecode('latin5', '%80', 'U+20AC');
testDecode('latin5', '%9F', 'U+0178');
testDecode('latin5', '%FD', 'U+0131');
testDecode('windows-1254', '%80', 'U+20AC');
successfullyParsed = true;
......
2008-05-13 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Darin.
<rdar://problem/5841351> Turkish ISO 8859-9 encoding should be treated as windows-1254
Match IE and upgrade ISO-8859-9 to windows-1254, which is its strict superset.
Test: fast/encoding/char-decoding.html
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::registerExtendedEncodingNames): Register the standard name
unconditionally. Previously, we registered windows-949-2000 as a special case that lacked
an IANA standard name, and got away with not registering GBK because it happened
to be reported by ICU normally earlier than any encoding upgraded to it.
2008-05-13 Tor Arne Vestbø <tavestbo@trolltech.com>
Reviewed by Simon
......@@ -71,10 +71,6 @@ void TextCodecICU::registerExtendedEncodingNames(EncodingNameRegistrar registrar
// apart; ICU works with either name.
registrar("ISO-8859-8-I", "ISO-8859-8-I");
// There is no standard name for this encoding, but we want to use it, and to map other encodings of EUC-KR family to it.
// No need to enumerate its aliases, as they are duplicated under KS_C_5601-1987.
registrar("windows-949-2000", "windows-949-2000");
int32_t numEncodings = ucnv_countAvailable();
for (int32_t i = 0; i < numEncodings; ++i) {
const char* name = ucnv_getAvailableName(i);
......@@ -92,8 +88,11 @@ void TextCodecICU::registerExtendedEncodingNames(EncodingNameRegistrar registrar
// Similarly, EUC-KR encodings all map to an extended version.
else if (strcmp(standardName, "KS_C_5601-1987") == 0 || strcmp(standardName, "EUC-KR") == 0)
standardName = "windows-949-2000";
else
registrar(standardName, standardName);
// And so on.
else if (strcmp(standardName, "ISO_8859-9:1989") == 0)
standardName = "windows-1254";
registrar(standardName, standardName);
uint16_t numAliases = ucnv_countAliases(name, &error);
ASSERT(U_SUCCESS(error));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment