diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js index 835b3b100..392238ba8 100644 --- a/chrome/content/zotero/xpcom/translation/translate_firefox.js +++ b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -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; }