Commit c6c08514 authored by ap@webkit.org's avatar ap@webkit.org
Browse files

Reviewed by John Sullivan.

        <rdar://problem/4852077> REGRESSION: The content of the HTML file which is saved as Thai
        (ISO 8859-11) disappear.

        <rdar://problem/5842597> Thai ISO-8859-11 should be upgraded to Windows-874

        Test: fast/encoding/char-decoding.html

        * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerExtendedEncodingNames):
        Register ISO-8859-11, which doesn't have a standard IANA name, despite following
        the usual 8859 naming scheme. Also, made TIS-620 map to windows-874-2000 explicitly.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1bed34e6
2008-05-13 Alexey Proskuryakov <ap@webkit.org>
Reviewed by John Sullivan.
<rdar://problem/4852077> REGRESSION: The content of the HTML file which is saved as Thai
(ISO 8859-11) disappear.
<rdar://problem/5842597> Thai ISO-8859-11 should be upgraded to Windows-874
* fast/encoding/char-decoding-expected.txt:
* fast/encoding/char-decoding.html:
2008-05-13 Alexey Proskuryakov <ap@webkit.org>
 
Reviewed by Eric Seidel.
......@@ -54,6 +54,21 @@ PASS decode('KOI8-R', '%A4') is 'U+2553'
PASS decode('KOI8-R', '%AD') is 'U+255C'
PASS decode('KOI8-U', '%A4') is 'U+0454'
PASS decode('KOI8-U', '%AD') is 'U+0491'
PASS decode('TIS-620', '%80') is 'U+20AC'
PASS decode('TIS-620', '%96') is 'U+2013'
PASS decode('TIS-620', '%A0') is 'U+00A0'
PASS decode('TIS-620', '%A1') is 'U+0E01'
PASS decode('ISO-8859-11', '%80') is 'U+20AC'
PASS decode('ISO-8859-11', '%96') is 'U+2013'
PASS decode('ISO-8859-11', '%A0') is 'U+00A0'
PASS decode('ISO-8859-11', '%A1') is 'U+0E01'
PASS decode('windows-874', '%80') is 'U+20AC'
PASS decode('windows-874', '%96') is 'U+2013'
PASS decode('windows-874', '%A0') is 'U+00A0'
PASS decode('windows-874', '%A1') is 'U+0E01'
PASS decode('windows-874', '%DB') is 'U+F8C1'
PASS decode('TIS-620', '%DB') is 'U+F8C1'
PASS decode('ISO-8859-11', '%DB') is 'U+F8C1'
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -100,6 +100,24 @@ testDecode('KOI8-R', '%AD', 'U+255C');
testDecode('KOI8-U', '%A4', 'U+0454');
testDecode('KOI8-U', '%AD', 'U+0491');
// Test that TIS-620 and ISO-8859-11 (Thai) are upgraded to windows-874.
testDecode('TIS-620', '%80', 'U+20AC');
testDecode('TIS-620', '%96', 'U+2013');
testDecode('TIS-620', '%A0', 'U+00A0');
testDecode('TIS-620', '%A1', 'U+0E01');
testDecode('ISO-8859-11', '%80', 'U+20AC');
testDecode('ISO-8859-11', '%96', 'U+2013');
testDecode('ISO-8859-11', '%A0', 'U+00A0');
testDecode('ISO-8859-11', '%A1', 'U+0E01');
testDecode('windows-874', '%80', 'U+20AC');
testDecode('windows-874', '%96', 'U+2013');
testDecode('windows-874', '%A0', 'U+00A0');
testDecode('windows-874', '%A1', 'U+0E01');
testDecode('windows-874', '%DB', 'U+F8C1'); // A weird PUA mapping that doesn't seem to be of any use, even on Windows.
testDecode('TIS-620', '%DB', 'U+F8C1');
testDecode('ISO-8859-11', '%DB', 'U+F8C1');
successfullyParsed = true;
</script>
......
2008-05-13 Alexey Proskuryakov <ap@webkit.org>
Reviewed by John Sullivan.
<rdar://problem/4852077> REGRESSION: The content of the HTML file which is saved as Thai
(ISO 8859-11) disappear.
<rdar://problem/5842597> Thai ISO-8859-11 should be upgraded to Windows-874
Test: fast/encoding/char-decoding.html
* platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerExtendedEncodingNames):
Register ISO-8859-11, which doesn't have a standard IANA name, despite following
the usual 8859 naming scheme. Also, made TIS-620 map to windows-874-2000 explicitly.
2008-05-13 chris fleizach <cfleizach@apple.com>
 
Reviewed by Beth Dakin
......@@ -91,6 +91,8 @@ void TextCodecICU::registerExtendedEncodingNames(EncodingNameRegistrar registrar
// And so on.
else if (strcmp(standardName, "ISO_8859-9:1989") == 0)
standardName = "windows-1254";
else if (strcmp(standardName, "TIS-620") == 0)
standardName = "windows-874-2000";
registrar(standardName, standardName);
......@@ -130,7 +132,8 @@ void TextCodecICU::registerExtendedEncodingNames(EncodingNameRegistrar registrar
registrar("winarabic", "windows-1256");
registrar("winbaltic", "windows-1257");
registrar("wincyrillic", "windows-1251");
registrar("windows874", "cp874");
registrar("windows874", "windows874-2000");
registrar("iso885911", "windows874-2000");
registrar("wingreek", "windows-1253");
registrar("winhebrew", "windows-1255");
registrar("winlatin2", "windows-1250");
......
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