Revert term/reading string normalization due to undesirable changes (#1959)

This commit is contained in:
toasted-nutbread 2021-09-26 13:29:50 -04:00 committed by GitHub
parent 076170cc38
commit 25fe3ba514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -587,10 +587,12 @@ class DictionaryImporter {
} }
_normalizeTermOrReading(text) { _normalizeTermOrReading(text) {
try { // Note: this function should not perform String.normalize on the text,
return text.normalize('NFC'); // as it will characters in an undesirable way.
} catch (e) { // Thus, this function is currently a no-op.
return text; // Example:
} // - '\u9038'.normalize('NFC') => '\u9038' (逸)
// - '\ufa67'.normalize('NFC') => '\u9038' (逸 => 逸)
return text;
} }
} }