Bug 959058 - Map GBK and GB2312 decoder constructors to the GB18030 decoder. r=emk.

This commit is contained in:
Henri Sivonen 2014-01-27 11:56:53 +02:00
parent 2b14212a78
commit 668a80479f
3 changed files with 31 additions and 4 deletions

View File

@ -355,9 +355,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO2022JP)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO2022KRToUnicode)
// ucvcn
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGB2312ToUnicodeV2)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGB2312V2)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGBKToUnicode)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToGBK)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHZToUnicode)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToHZ)
@ -839,9 +837,9 @@ static const mozilla::Module::CIDEntry kUConvCIDs[] = {
{ &kNS_JOHABTOUNICODE_CID, false, nullptr, nsJohabToUnicodeConstructor },
{ &kNS_UNICODETOJOHAB_CID, false, nullptr, nsUnicodeToJohabConstructor },
{ &kNS_ISO2022KRTOUNICODE_CID, false, nullptr, nsISO2022KRToUnicodeConstructor },
{ &kNS_GB2312TOUNICODE_CID, false, nullptr, nsGB2312ToUnicodeV2Constructor },
{ &kNS_GB2312TOUNICODE_CID, false, nullptr, nsGB18030ToUnicodeConstructor },
{ &kNS_UNICODETOGB2312_CID, false, nullptr, nsUnicodeToGB2312V2Constructor },
{ &kNS_GBKTOUNICODE_CID, false, nullptr, nsGBKToUnicodeConstructor },
{ &kNS_GBKTOUNICODE_CID, false, nullptr, nsGB18030ToUnicodeConstructor },
{ &kNS_UNICODETOGBK_CID, false, nullptr, nsUnicodeToGBKConstructor },
{ &kNS_HZTOUNICODE_CID, false, nullptr, nsHZToUnicodeConstructor },
{ &kNS_UNICODETOHZ_CID, false, nullptr, nsUnicodeToHZConstructor },

View File

@ -2,6 +2,7 @@
[test_bug335816.html]
[test_bug843434.html]
[test_bug959058.html]
[test_long_doc.html]
[test_singlebyte_overconsumption.html]
[test_unicode_noncharacterescapes.html]

View File

@ -0,0 +1,28 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=959058
-->
<head>
<meta charset="gbk">
<title>Test for Bug 959058</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 959058 **/
is("”9¸2", "\uD83C\uDF54", "Should have gotten a hamburger.");
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=959058">Mozilla Bug 959058</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>