charset is a complex value in newer Fx versions
probably fixes http://forums.zotero.org/discussion/21956/zotero-wont-accept-ris-file/#Item_2
This commit is contained in:
parent
bfa7b5b153
commit
6a68139591
|
@ -332,10 +332,22 @@ Zotero.Translate.IO.Read = function(file, mode) {
|
|||
// if the regexp continues to fail, this is not UTF-8
|
||||
if(!isUTF8) {
|
||||
// Can't be UTF-8; see if a default charset is defined
|
||||
this._charset = Zotero.Prefs.get("intl.charset.default", true);
|
||||
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
try {
|
||||
this._charset = prefs.getComplexValue("intl.charset.default",
|
||||
Components.interfaces.nsIPrefLocalizedString).toString();
|
||||
} catch(e) {}
|
||||
|
||||
// ISO-8859-1 by default
|
||||
if(!this._charset) this._charset = "ISO-8859-1";
|
||||
if(!this._charset) {
|
||||
try {
|
||||
this._charset = prefs.getCharPref("intl.charset.default");
|
||||
} catch(e) {}
|
||||
|
||||
|
||||
// ISO-8859-1 by default
|
||||
if(!this._charset) this._charset = "ISO-8859-1";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user