Bug 1174580 - Doesn't display GB2312 encoded texts correctly for Chinese Characters. r=jcranmer, a=rkent
--- a/mail/locales/en-US/chrome/messenger/charsetTitles.properties
+++ b/mail/locales/en-US/chrome/messenger/charsetTitles.properties
@@ -30,17 +30,16 @@ x-mac-croatian.title = Croatian (MacC
x-mac-romanian.title = Romanian (MacRomanian)
x-mac-icelandic.title = Icelandic (MacIcelandic)
iso-2022-jp.title = Japanese (ISO-2022-JP)
shift_jis.title = Japanese (Shift_JIS)
euc-jp.title = Japanese (EUC-JP)
big5.title = Chinese Traditional (Big5)
big5-hkscs.title = Chinese Traditional (Big5-HKSCS)
gb2312.title = Chinese Simplified (GB2312)
-hz-gb-2312.title = Chinese Simplified (HZ)
gbk.title = Chinese Simplified (GBK)
euc-kr.title = Korean (EUC-KR)
utf-7.title = Unicode (UTF-7)
utf-8.title = Unicode (UTF-8)
utf-16.title = Unicode (UTF-16)
utf-16le.title = Unicode (UTF-16LE)
utf-16be.title = Unicode (UTF-16BE)
iso-8859-5.title = Cyrillic (ISO-8859-5)
--- a/mailnews/compose/src/nsMsgCompUtils.cpp
+++ b/mailnews/compose/src/nsMsgCompUtils.cpp
@@ -930,18 +930,17 @@ msg_generate_message_id (nsIMsgIdentity
return PR_smprintf("<%lX.%lX@%s>",
(unsigned long) now, (unsigned long) salt, host);
}
inline static bool is7bitCharset(const nsCString& charset)
{
// charset name is canonical (no worry about case-sensitivity)
- return charset.EqualsLiteral("HZ-GB-2312") ||
- Substring(charset, 0, 8).EqualsLiteral("ISO-2022-");
+ return Substring(charset, 0, 8).EqualsLiteral("ISO-2022-");
}
#define PR_MAX_FOLDING_LEN 75 // this is to gurantee the folded line will
// never be greater than 78 = 75 + CRLFLWSP
/*static */ char *
RFC2231ParmFolding(const char *parmName, const nsCString& charset,
const char *language, const nsString& parmValue)
{
--- a/mailnews/intl/charsetData.properties
+++ b/mailnews/intl/charsetData.properties
@@ -45,17 +45,16 @@ x-x-big5.LangGroup = zh-
big5-hkscs.LangGroup = zh-HK
euc-jp.LangGroup = ja
euc-kr.LangGroup = ko
gb2312.LangGroup = zh-CN
gb18030.LangGroup = zh-CN
gb18030.2000-0.LangGroup = zh-CN
gb18030.2000-1.LangGroup = zh-CN
hkscs-1.LangGroup = zh-HK
-hz-gb-2312.LangGroup = zh-CN
ibm866.LangGroup = x-cyrillic
ibm1125.LangGroup = x-cyrillic
ibm1131.LangGroup = x-cyrillic
iso-2022-jp.LangGroup = ja
iso-8859-1.LangGroup = x-western
iso-8859-10.LangGroup = x-western
iso-8859-14.LangGroup = x-western
iso-8859-15.LangGroup = x-western
@@ -86,17 +85,16 @@ windows-1251.LangGroup = x-c
windows-1252.LangGroup = x-western
windows-1253.LangGroup = el
windows-1254.LangGroup = x-western
windows-1255.LangGroup = he
windows-1256.LangGroup = ar
windows-1257.LangGroup = x-western
windows-1258.LangGroup = x-western
gbk.LangGroup = zh-CN
-gb_2312-80.LangGroup = zh-CN
x-mac-ce.LangGroup = x-western
x-mac-croatian.LangGroup = x-western
x-mac-cyrillic.LangGroup = x-cyrillic
x-mac-devanagari.LangGroup = x-devanagari
x-mac-farsi.LangGroup = ar
x-mac-greek.LangGroup = el
x-mac-gujarati.LangGroup = x-gujr
x-mac-gurmukhi.LangGroup = x-guru
@@ -111,13 +109,12 @@ x-mac-hebrew.LangGroup = he
x-mac-arabic.LangGroup = ar
iso-2022-jp.isMultibyte = true
shift_jis.isMultibyte = true
euc-jp.isMultibyte = true
big5.isMultibyte = true
big5-hkscs.isMultibyte = true
gb2312.isMultibyte = true
-hz-gb-2312.isMultibyte = true
euc-kr.isMultibyte = true
utf-7.isMultibyte = true
utf-8.isMultibyte = true
replacement.isMultibyte = true
--- a/mailnews/intl/charsetalias.properties
+++ b/mailnews/intl/charsetalias.properties
@@ -12,18 +12,16 @@
# This file contains mainly aliases. Actual labels for encodings are in
# labelsencodings.properties. Besides aliases it contains labels for charsets
# that are not part of the HTML5 world, but still are supported for e-mail.
646=windows-1252
iso-8859-1=ISO-8859-1
utf-16=UTF-16
utf-7=UTF-7
-gb2312=GB2312
-hz-gb-2312=HZ-GB-2312
# Netscape private ...
x-imap4-modified-utf7=x-imap4-modified-utf7
x-mac-ce=x-mac-ce
x-mac-turkish=x-mac-turkish
x-mac-greek=x-mac-greek
x-mac-icelandic=x-mac-icelandic
x-mac-croatian=x-mac-croatian
@@ -63,28 +61,16 @@ csiso2022jp2=ISO-2022-JP
# x-x-big5 is not really a alias for Big5, add it only for MS FrontPage
# Sun Solaris
zh_tw-big5=Big5
# Aliases for EUC-KR
5601=EUC-KR
-# Aliases for GB2312
-# The following are really not aliases GB2312, add them only for MS FrontPage
-gb_2312-80=GB2312
-iso-ir-58=GB2312
-chinese=GB2312
-csiso58gb231280=GB2312
-csgb2312=GB2312
-zh_cn.euc=GB2312
-
-# Sun Solaris
-gb_2312=GB2312
-
# Aliases for windows-874
tis620=windows-874
# Aliases for IBM866
cp-866=IBM866
# Aliases for UTF-7
x-unicode-2-0-utf-7=UTF-7