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.)
This commit is contained in:
Dan Stillman 2015-05-31 22:58:11 -04:00
parent 1979efd8ce
commit 4fd65fec4c

View file

@ -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"
};