mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 801402 - Reintroduce x-windows-949 hack. r=hsivonen
This commit is contained in:
parent
d8a5ab8510
commit
202ef70d50
@ -206,6 +206,13 @@ TextDecoder::GetEncoding(nsAString& aEncoding)
|
||||
return;
|
||||
}
|
||||
|
||||
// Similarly, "x-windows-949" is used for the "euc-kr" family. Therefore, if
|
||||
// the internal encoding name is "x-windows-949", "euc-kr" is returned.
|
||||
if (mEncoding.EqualsLiteral("x-windows-949")) {
|
||||
aEncoding.AssignLiteral("euc-kr");
|
||||
return;
|
||||
}
|
||||
|
||||
CopyASCIItoUTF16(mEncoding, aEncoding);
|
||||
nsContentUtils::ASCIIToLower(aEncoding);
|
||||
}
|
||||
|
@ -205,16 +205,16 @@ shift_jis=Shift_JIS
|
||||
sjis=Shift_JIS
|
||||
windows-31j=Shift_JIS
|
||||
x-sjis=Shift_JIS
|
||||
cseuckr=EUC-KR
|
||||
csksc56011987=EUC-KR
|
||||
euc-kr=EUC-KR
|
||||
iso-ir-149=EUC-KR
|
||||
korean=EUC-KR
|
||||
ks_c_5601-1987=EUC-KR
|
||||
ks_c_5601-1989=EUC-KR
|
||||
ksc5601=EUC-KR
|
||||
ksc_5601=EUC-KR
|
||||
windows-949=EUC-KR
|
||||
cseuckr=x-windows-949
|
||||
csksc56011987=x-windows-949
|
||||
euc-kr=x-windows-949
|
||||
iso-ir-149=x-windows-949
|
||||
korean=x-windows-949
|
||||
ks_c_5601-1987=x-windows-949
|
||||
ks_c_5601-1989=x-windows-949
|
||||
ksc5601=x-windows-949
|
||||
ksc_5601=x-windows-949
|
||||
windows-949=x-windows-949
|
||||
csiso2022kr=ISO-2022-KR
|
||||
iso-2022-kr=ISO-2022-KR
|
||||
utf-16=UTF-16LE
|
||||
|
@ -21,6 +21,7 @@ MOCHITEST_FILES = \
|
||||
test_TextEncoder.html \
|
||||
test_TextEncoder.js \
|
||||
test_stringencoding.html \
|
||||
test_submit_euckr.html \
|
||||
$(NULL)
|
||||
|
||||
MOCHITEST_CHROME_FILES = \
|
||||
|
34
dom/encoding/test/test_submit_euckr.html
Normal file
34
dom/encoding/test/test_submit_euckr.html
Normal file
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Test for euc-kr encoded form submission</title>
|
||||
<script type="text/javascript" src="/resources/testharness.js"></script>
|
||||
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<iframe name="ifr"></iframe>
|
||||
<form accept-charset="euc-kr" action="abc" target="ifr">
|
||||
<input type="hidden" name="a" value="갂">
|
||||
</form>
|
||||
<script>
|
||||
|
||||
runTest();
|
||||
|
||||
function runTest() {
|
||||
var t = async_test("Test for euc-kr encoded form submission");
|
||||
var f = document.forms[0];
|
||||
var ifr = frames.ifr;
|
||||
ifr.onload = function() {
|
||||
t.step(function() {
|
||||
assert_equals("".split.call(ifr.location, "?")[1], "a=%81A");
|
||||
});
|
||||
t.done();
|
||||
};
|
||||
f.submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user