Default to UTF-8 when indexing text file without detected charset

https://forums.zotero.org/discussion/94637/indexing-of-markdown-plain-text-attachments-with-md-extension
This commit is contained in:
Dan Stillman 2022-10-12 05:00:30 -04:00
parent 78eb857e73
commit 3582405f55

View file

@ -381,8 +381,8 @@ Zotero.Fulltext = Zotero.FullText = new function(){
}
if (!charset) {
Zotero.logError(`Item ${itemID} didn't have a charset`);
return false;
Zotero.debug(`Item ${itemID} doesn't have a charset set -- using 'utf-8'`);
charset = 'utf-8';
}
var maxLength = Zotero.Prefs.get('fulltext.textMaxLength');