Skip to content

Commit

Permalink
Bug 802069 - Make "macintosh" the canonical name of its encoding, not…
Browse files Browse the repository at this point in the history
… "x-mac-roman"; r=smontagu
  • Loading branch information
ayg committed Oct 17, 2012
1 parent 980a9dd commit 51221ce
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion dom/locales/en-US/chrome/charsetTitles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ windows-1250.title = Central European (Windows-1250)
windows-1252.title = Western (Windows-1252)
windows-1254.title = Turkish (Windows-1254)
windows-1257.title = Baltic (Windows-1257)
x-mac-roman.title = Western (MacRoman)
macintosh.title = Western (MacRoman)
x-mac-ce.title = Central European (MacCE)
x-mac-turkish.title = Turkish (MacTurkish)
x-mac-croatian.title = Croatian (MacCroatian)
Expand Down
2 changes: 1 addition & 1 deletion dom/plugins/base/nsPluginInstanceOwner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ static const moz2javaCharset charsets[] =
{"x-mac-greek", "MacGreek"},
{"x-mac-hebrew", "MacHebrew"},
{"x-mac-icelandic", "MacIceland"},
{"x-mac-roman", "MacRoman"},
{"macintosh", "MacRoman"},
{"x-mac-romanian", "MacRomania"},
{"x-mac-ukrainian", "MacUkraine"},
{"Shift_JIS", "SJIS"},
Expand Down
4 changes: 2 additions & 2 deletions gfx/thebes/gfxFontUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1614,14 +1614,14 @@ gfxFontUtils::ReadCanonicalName(FallibleTArray<uint8_t>& aNameTable, uint32_t aN
#define ANY 0xffff
const gfxFontUtils::MacFontNameCharsetMapping gfxFontUtils::gMacFontNameCharsets[] =
{
{ ENCODING_ID_MAC_ROMAN, LANG_ID_MAC_ENGLISH, "x-mac-roman" },
{ ENCODING_ID_MAC_ROMAN, LANG_ID_MAC_ENGLISH, "macintosh" },
{ ENCODING_ID_MAC_ROMAN, LANG_ID_MAC_ICELANDIC, "x-mac-icelandic" },
{ ENCODING_ID_MAC_ROMAN, LANG_ID_MAC_TURKISH, "x-mac-turkish" },
{ ENCODING_ID_MAC_ROMAN, LANG_ID_MAC_POLISH, "x-mac-ce" },
{ ENCODING_ID_MAC_ROMAN, LANG_ID_MAC_ROMANIAN, "x-mac-romanian" },
{ ENCODING_ID_MAC_ROMAN, LANG_ID_MAC_CZECH, "x-mac-ce" },
{ ENCODING_ID_MAC_ROMAN, LANG_ID_MAC_SLOVAK, "x-mac-ce" },
{ ENCODING_ID_MAC_ROMAN, ANY, "x-mac-roman" },
{ ENCODING_ID_MAC_ROMAN, ANY, "macintosh" },
{ ENCODING_ID_MAC_JAPANESE, LANG_ID_MAC_JAPANESE, "Shift_JIS" },
{ ENCODING_ID_MAC_JAPANESE, ANY, "Shift_JIS" },
{ ENCODING_ID_MAC_TRAD_CHINESE, LANG_ID_MAC_TRAD_CHINESE, "Big5" },
Expand Down
11 changes: 5 additions & 6 deletions intl/locale/src/charsetalias.properties
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ cns11643=x-euc-tw
#
x-imap4-modified-utf7=x-imap4-modified-utf7
x-euc-tw=x-euc-tw
x-mac-roman=x-mac-roman
x-mac-ce=x-mac-ce
x-mac-turkish=x-mac-turkish
x-mac-greek=x-mac-greek
Expand Down Expand Up @@ -323,12 +322,12 @@ windows-874=windows-874
ibm874=windows-874
dos-874=windows-874
#
# Aliases for x-mac-roman
# XXX: should make macintosh the canonical name later
# Aliases for macintosh
#
macintosh=x-mac-roman
mac=x-mac-roman
csmacintosh=x-mac-roman
macintosh=macintosh
x-mac-roman=macintosh
mac=macintosh
csmacintosh=macintosh
#
# Aliases for IBM866
#
Expand Down
2 changes: 1 addition & 1 deletion intl/uconv/src/charsetData.properties
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ x-mac-greek.LangGroup = el
x-mac-gujarati.LangGroup = x-gujr
x-mac-gurmukhi.LangGroup = x-guru
x-mac-icelandic.LangGroup = x-western
x-mac-roman.LangGroup = x-western
macintosh.LangGroup = x-western
x-mac-turkish.LangGroup = tr
x-mac-ukrainian.LangGroup = x-cyrillic
x-mac-romanian.LangGroup = x-central-euro
Expand Down
2 changes: 1 addition & 1 deletion intl/uconv/src/nsMacRomanToUnicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define NS_MACROMANTOUNICODE_CID \
{ 0x7b8556a1, 0xec79, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}

#define NS_MACROMANTOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=x-mac-roman"
#define NS_MACROMANTOUNICODE_CONTRACTID "@mozilla.org/intl/unicode/decoder;1?charset=macintosh"

//#define NS_ERROR_UCONV_NOMACROMANTOUNICODE
// NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 0x31)
Expand Down
2 changes: 1 addition & 1 deletion intl/uconv/src/nsUConvModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
NS_CONVERTER_REGISTRY_START
NS_UCONV_REG_UNREG("ISO-8859-1", NS_ISO88591TOUNICODE_CID, NS_UNICODETOISO88591_CID)
NS_UCONV_REG_UNREG("windows-1252", NS_CP1252TOUNICODE_CID, NS_UNICODETOCP1252_CID)
NS_UCONV_REG_UNREG("x-mac-roman", NS_MACROMANTOUNICODE_CID, NS_UNICODETOMACROMAN_CID)
NS_UCONV_REG_UNREG("macintosh", NS_MACROMANTOUNICODE_CID, NS_UNICODETOMACROMAN_CID)
NS_UCONV_REG_UNREG("UTF-8", NS_UTF8TOUNICODE_CID, NS_UNICODETOUTF8_CID)

// ucvlatin
Expand Down
2 changes: 1 addition & 1 deletion intl/uconv/src/nsUnicodeToMacRoman.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define NS_UNICODETOMACROMAN_CID \
{ 0x7b8556af, 0xec79, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}

#define NS_UNICODETOMACROMAN_CONTRACTID "@mozilla.org/intl/unicode/encoder;1?charset=x-mac-roman"
#define NS_UNICODETOMACROMAN_CONTRACTID "@mozilla.org/intl/unicode/encoder;1?charset=macintosh"

/**
* A character set converter from Unicode to MacRoman.
Expand Down
4 changes: 2 additions & 2 deletions intl/uconv/tests/unit/test_bug718500.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var detectList = [
var encoderList = [
"ISO-8859-1",
"windows-1252",
"x-mac-roman",
"macintosh",
"UTF-8",
"us-ascii",
"ISO-8859-2",
Expand Down Expand Up @@ -105,7 +105,7 @@ var encoderList = [
var decoderList = [
"ISO-8859-1",
"windows-1252",
"x-mac-roman",
"macintosh",
"UTF-8",
"us-ascii",
"ISO-8859-2",
Expand Down
4 changes: 2 additions & 2 deletions intl/uconv/tests/unit/xpcshell.ini
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ tail =
[test_decode_x_mac_hebrew.js]
[test_decode_x_mac_hebrew_internal.js]
[test_decode_x_mac_icelandic.js]
[test_decode_x_mac_roman.js]
[test_decode_macintosh.js]
[test_decode_x_mac_romanian.js]
[test_decode_x_mac_turkish.js]
[test_decode_x_mac_ukrainian.js]
Expand Down Expand Up @@ -142,7 +142,7 @@ tail =
[test_encode_x_mac_hebrew.js]
[test_encode_x_mac_hebrew_internal.js]
[test_encode_x_mac_icelandic.js]
[test_encode_x_mac_roman.js]
[test_encode_macintosh.js]
[test_encode_x_mac_romanian.js]
[test_encode_x_mac_turkish.js]
[test_encode_x_mac_ukrainian.js]
Expand Down
2 changes: 1 addition & 1 deletion modules/libpref/src/init/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ pref("intl.accept_languages", "chrome://global/locale/intl.propert
pref("intl.menuitems.alwaysappendaccesskeys","chrome://global/locale/intl.properties");
pref("intl.menuitems.insertseparatorbeforeaccesskeys","chrome://global/locale/intl.properties");
pref("intl.charsetmenu.browser.static", "chrome://global/locale/intl.properties");
pref("intl.charsetmenu.browser.more1", "ISO-8859-1, ISO-8859-15, IBM850, x-mac-roman, windows-1252, ISO-8859-14, ISO-8859-7, x-mac-greek, windows-1253, x-mac-icelandic, ISO-8859-10, ISO-8859-3");
pref("intl.charsetmenu.browser.more1", "ISO-8859-1, ISO-8859-15, IBM850, macintosh, windows-1252, ISO-8859-14, ISO-8859-7, x-mac-greek, windows-1253, x-mac-icelandic, ISO-8859-10, ISO-8859-3");
pref("intl.charsetmenu.browser.more2", "ISO-8859-4, ISO-8859-13, windows-1257, IBM852, ISO-8859-2, x-mac-ce, windows-1250, x-mac-croatian, IBM855, ISO-8859-5, ISO-IR-111, KOI8-R, x-mac-cyrillic, windows-1251, IBM866, KOI8-U, x-mac-ukrainian, ISO-8859-16, x-mac-romanian");
pref("intl.charsetmenu.browser.more3", "GB2312, gbk, gb18030, HZ-GB-2312, ISO-2022-CN, Big5, Big5-HKSCS, x-euc-tw, EUC-JP, ISO-2022-JP, Shift_JIS, EUC-KR, x-windows-949, x-johab, ISO-2022-KR");
pref("intl.charsetmenu.browser.more4", "armscii-8, TIS-620, ISO-8859-11, windows-874, IBM857, ISO-8859-9, x-mac-turkish, windows-1254, x-viet-tcvn5712, VISCII, x-viet-vps, windows-1258, x-mac-devanagari, x-mac-gujarati, x-mac-gurmukhi");
Expand Down
6 changes: 3 additions & 3 deletions toolkit/components/search/nsSearchService.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ function getDir(aKey, aIFace) {
*/
function queryCharsetFromCode(aCode) {
const codes = [];
codes[0] = "x-mac-roman";
codes[0] = "macintosh";
codes[6] = "x-mac-greek";
codes[35] = "x-mac-turkish";
codes[513] = "ISO-8859-1";
Expand Down Expand Up @@ -487,7 +487,7 @@ function queryCharsetFromCode(aCode) {
}
function fileCharsetFromCode(aCode) {
const codes = [
"x-mac-roman", // 0
"macintosh", // 0
"Shift_JIS", // 1
"Big5", // 2
"EUC-KR", // 3
Expand Down Expand Up @@ -519,7 +519,7 @@ function fileCharsetFromCode(aCode) {
"X-MAC-VIETNAMESE", // 30
"X-MAC-EXTARABIC" // 31
];
// Sherlock files have always defaulted to x-mac-roman, so do that here too
// Sherlock files have always defaulted to macintosh, so do that here too
return codes[aCode] || codes[0];
}

Expand Down

0 comments on commit 51221ce

Please sign in to comment.