Bug 797385 - Part 2: Remove ibm864 usage. r=smontagu
This commit is contained in:
@@ -633,8 +633,6 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
int32_t textType = GET_BIDI_OPTION_TEXTTYPE(GetBidiOptions());
|
||||
|
||||
// Look for the parent document. Note that at this point we don't have our
|
||||
// content viewer set up yet, and therefore do not have a useful
|
||||
// mParentDocument.
|
||||
@@ -789,13 +787,6 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
parserCharset = charset;
|
||||
parserCharsetSource = charsetSource;
|
||||
}
|
||||
|
||||
// ahmed
|
||||
// Check if 864 but in Implicit mode !
|
||||
if ((textType == IBMBIDI_TEXTTYPE_LOGICAL) &&
|
||||
(charset.LowerCaseEqualsLiteral("ibm864"))) {
|
||||
charset.AssignLiteral("IBM864i");
|
||||
}
|
||||
}
|
||||
|
||||
SetDocumentCharacterSetSource(charsetSource);
|
||||
|
||||
@@ -20,10 +20,6 @@ static const LabelEncoding labelsEncodings[] = {
|
||||
{"unicode-1-1-utf-8", "utf-8"},
|
||||
{"utf-8", "utf-8"},
|
||||
{"utf8", "utf-8"},
|
||||
{"cp864", "ibm864"},
|
||||
{"csibm864", "ibm864"},
|
||||
{"ibm-864", "ibm864"},
|
||||
{"ibm864", "ibm864"},
|
||||
{"866", "ibm866"},
|
||||
{"cp866", "ibm866"},
|
||||
{"csibm866", "ibm866"},
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
|
||||
/**
|
||||
* Implements decode algorithm's step 1 & 2 from Encoding spec.
|
||||
* http://dvcs.w3.org/hg/encoding/raw-file/tip/Overview.html#decode
|
||||
* http://encoding.spec.whatwg.org/#decode
|
||||
*
|
||||
* @param aData, incoming byte stream of data.
|
||||
* @param aLength, incoming byte stream length.
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
|
||||
/**
|
||||
* Implements get an encoding algorithm from Encoding spec.
|
||||
* http://dvcs.w3.org/hg/encoding/raw-file/tip/Overview.html#concept-encoding-get
|
||||
* http://encoding.spec.whatwg.org/#concept-encoding-get
|
||||
* Given a label, this function returns the corresponding encoding or a
|
||||
* false.
|
||||
*
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
/**
|
||||
* Remove any leading and trailing space characters, following the
|
||||
* definition of space characters from Encoding spec.
|
||||
* http://dvcs.w3.org/hg/encoding/raw-file/tip/Overview.html#terminology
|
||||
* http://encoding.spec.whatwg.org/#terminology
|
||||
* Note that nsAString::StripWhitespace() doesn't exactly match the
|
||||
* definition. It also removes all matching chars in the string,
|
||||
* not just leading and trailing.
|
||||
|
||||
@@ -332,7 +332,7 @@ test(
|
||||
"Supersets of ASCII decode ASCII correctly",
|
||||
38,
|
||||
function () {
|
||||
var encodings = ["utf-8", "ibm864", "ibm866", "iso-8859-2", "iso-8859-3", "iso-8859-4", "iso-8859-5", "iso-8859-6", "iso-8859-7", "iso-8859-8", "iso-8859-10", "iso-8859-13", "iso-8859-14", "iso-8859-15", "iso-8859-16", "koi8-r", "koi8-u", "macintosh", "windows-874", "windows-1250", "windows-1251", "windows-1252", "windows-1253", "windows-1254", "windows-1255", "windows-1256", "windows-1257", "windows-1258", "x-mac-cyrillic", "gbk", "gb18030", "hz-gb-2312", "big5", "euc-jp", "iso-2022-jp", "shift_jis", "euc-kr", "iso-2022-kr"];
|
||||
var encodings = ["utf-8", "ibm866", "iso-8859-2", "iso-8859-3", "iso-8859-4", "iso-8859-5", "iso-8859-6", "iso-8859-7", "iso-8859-8", "iso-8859-10", "iso-8859-13", "iso-8859-14", "iso-8859-15", "iso-8859-16", "koi8-r", "koi8-u", "macintosh", "windows-874", "windows-1250", "windows-1251", "windows-1252", "windows-1253", "windows-1254", "windows-1255", "windows-1256", "windows-1257", "windows-1258", "x-mac-cyrillic", "gbk", "gb18030", "hz-gb-2312", "big5", "euc-jp", "iso-2022-jp", "shift_jis", "euc-kr", "iso-2022-kr"];
|
||||
|
||||
encodings.forEach(function (encoding) {
|
||||
var string = '', bytes = [];
|
||||
@@ -346,8 +346,6 @@ test(
|
||||
if (encoding === "iso-2022-kr" && (i === 0x0E || i === 0x0F || i === 0x1B))
|
||||
continue;
|
||||
// TODO: Gecko decoder bugs
|
||||
if (encoding === "ibm864" && i === 0x25)
|
||||
continue;
|
||||
if ((encoding === "big5" || encoding === "euc-kr") && i === 0x7F)
|
||||
continue;
|
||||
|
||||
@@ -356,6 +354,8 @@ test(
|
||||
}
|
||||
var ascii_encoded = TextEncoder('utf-8').encode(string);
|
||||
equal(TextDecoder(encoding).decode(ascii_encoded), string, encoding);
|
||||
//arrayEqual(TextEncoder(encoding).encode(string), bytes, encoding);
|
||||
if (encoding === "utf-8") {
|
||||
arrayEqual(TextEncoder(encoding).encode(string), bytes, encoding);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -84,7 +84,6 @@ ibm852.title = Central European (IBM-852)
|
||||
ibm855.title = Cyrillic (IBM-855)
|
||||
ibm857.title = Turkish (IBM-857)
|
||||
ibm862.title = Hebrew (IBM-862)
|
||||
ibm864.title = Arabic (IBM-864)
|
||||
ibm864i.title = Arabic (IBM-864-I)
|
||||
gb18030.title = Chinese Simplified (GB18030)
|
||||
x-mac-arabic.title = Arabic (MacArabic)
|
||||
|
||||
@@ -966,7 +966,6 @@ static const moz2javaCharset charsets[] =
|
||||
{"IBM855", "Cp855"},
|
||||
{"IBM857", "Cp857"},
|
||||
{"IBM828", "Cp862"},
|
||||
{"IBM864", "Cp864"},
|
||||
{"IBM866", "Cp866"},
|
||||
{"windows-1250", "Cp1250"},
|
||||
{"windows-1251", "Cp1251"},
|
||||
|
||||
@@ -9,5 +9,5 @@ const expectedString = " !\"#$\u066a&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ
|
||||
const aliases = [ "IBM864", "ibm864", "cp864", "864", "csibm864", "ibm-864" ];
|
||||
|
||||
function run_test() {
|
||||
testDecodeAliases();
|
||||
testDecodeAliasesInternal();
|
||||
}
|
||||
|
||||
@@ -9,5 +9,5 @@ const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV
|
||||
const aliases = [ "IBM864", "ibm864", "cp864", "864", "csibm864", "ibm-864" ];
|
||||
|
||||
function run_test() {
|
||||
testEncodeAliases();
|
||||
testEncodeAliasesInternal();
|
||||
}
|
||||
|
||||
@@ -173,8 +173,7 @@ nsPresContext::PrefChangedUpdateTimerCallback(nsITimer *aTimer, void *aClosure)
|
||||
static bool
|
||||
IsVisualCharset(const nsCString& aCharset)
|
||||
{
|
||||
if (aCharset.LowerCaseEqualsLiteral("ibm864") // Arabic//ahmed
|
||||
|| aCharset.LowerCaseEqualsLiteral("ibm862") // Hebrew
|
||||
if (aCharset.LowerCaseEqualsLiteral("ibm862") // Hebrew
|
||||
|| aCharset.LowerCaseEqualsLiteral("iso-8859-8") ) { // Hebrew
|
||||
return true; // visual text type
|
||||
}
|
||||
|
||||
@@ -1260,7 +1260,7 @@ pref("intl.charsetmenu.browser.more1", "ISO-8859-1, ISO-8859-15, IBM850, x-
|
||||
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");
|
||||
pref("intl.charsetmenu.browser.more5", "ISO-8859-6, windows-1256, IBM864, ISO-8859-8-I, windows-1255, ISO-8859-8, IBM862");
|
||||
pref("intl.charsetmenu.browser.more5", "ISO-8859-6, windows-1256, ISO-8859-8-I, windows-1255, ISO-8859-8, IBM862");
|
||||
pref("intl.charsetmenu.browser.unicode", "UTF-8, UTF-16LE, UTF-16BE");
|
||||
pref("intl.charsetmenu.mailedit", "chrome://global/locale/intl.properties");
|
||||
pref("intl.charsetmenu.browser.cache", "");
|
||||
|
||||
@@ -457,7 +457,6 @@ function queryCharsetFromCode(aCode) {
|
||||
codes[519] = "ISO-8859-7";
|
||||
codes[520] = "ISO-8859-8";
|
||||
codes[521] = "ISO-8859-9";
|
||||
codes[1049] = "IBM864";
|
||||
codes[1280] = "windows-1252";
|
||||
codes[1281] = "windows-1250";
|
||||
codes[1282] = "windows-1251";
|
||||
|
||||
Reference in New Issue
Block a user