Don't strip extended characters in duplicate detection

This commit is contained in:
Dan Stillman 2011-08-26 20:45:27 +00:00
parent 3e97b803cd
commit 207af37ee7

View file

@ -111,7 +111,7 @@ Zotero.Duplicates.prototype._findDuplicates = function () {
str = str + "";
str = Zotero.Utilities.removeDiacritics(str)
.replace(/[^!-~]/g, ' ') // Convert punctuation to spaces
.replace(/[!-/:-@[-`{-~]/g, ' ') // Convert (ASCII) punctuation to spaces
.replace(/ +/, ' ') // Normalize spaces
.toLowerCase();
@ -173,6 +173,7 @@ Zotero.Duplicates.prototype._findDuplicates = function () {
processRows(function (a, b) {
a = normalizeString(a.value);
b = normalizeString(b.value);
// If we stripped one of the strings completely, we can't compare them
if (a.length == 0 || b.length == 0) {
return -1;