From 4fd65fec4cf13b6c4e57a637ab400422209ef46e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 31 May 2015 22:58:11 -0400 Subject: [PATCH] Fix charset handling in Zotero.File.getContentsAsync() Character sets are now populated on demand, so they can't be run through Zotero.CharacterSets.getName() in getContentsAsync(), since they might not exist. (I'm also not sure why this was being done anyway.) --- chrome/content/zotero/xpcom/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 7b7621973..fdf8157cd 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -209,7 +209,7 @@ Zotero.File = new function(){ } var options = { - charset: charset ? Zotero.CharacterSets.getName(charset) : "UTF-8", + charset: charset ? charset : "UTF-8", // This doesn't seem to work -- reading an image file still throws NS_ERROR_ILLEGAL_INPUT replacement: "\uFFFD" };