From 25fe3ba5149cda36e173ee7427324fa74e6784be Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 26 Sep 2021 13:29:50 -0400 Subject: Revert term/reading string normalization due to undesirable changes (#1959) --- ext/js/language/dictionary-importer.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ext') diff --git a/ext/js/language/dictionary-importer.js b/ext/js/language/dictionary-importer.js index ad5d7a70..7a070b8d 100644 --- a/ext/js/language/dictionary-importer.js +++ b/ext/js/language/dictionary-importer.js @@ -587,10 +587,12 @@ class DictionaryImporter { } _normalizeTermOrReading(text) { - try { - return text.normalize('NFC'); - } catch (e) { - return text; - } + // Note: this function should not perform String.normalize on the text, + // as it will characters in an undesirable way. + // Thus, this function is currently a no-op. + // Example: + // - '\u9038'.normalize('NFC') => '\u9038' (逸) + // - '\ufa67'.normalize('NFC') => '\u9038' (逸 => 逸) + return text; } } -- cgit v1.2.3