summaryrefslogtreecommitdiff
path: root/ext/js/language/dictionary-importer.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-09-26 13:29:50 -0400
committerGitHub <noreply@github.com>2021-09-26 13:29:50 -0400
commit25fe3ba5149cda36e173ee7427324fa74e6784be (patch)
tree466593ef16279fdc6b0eaeb7142e46346a4860f1 /ext/js/language/dictionary-importer.js
parent076170cc3880ae673a7a94c64e64ee54afb7cfbc (diff)
Revert term/reading string normalization due to undesirable changes (#1959)
Diffstat (limited to 'ext/js/language/dictionary-importer.js')
-rw-r--r--ext/js/language/dictionary-importer.js12
1 files changed, 7 insertions, 5 deletions
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;
}
}