diff --git a/LunaTranslator/LunaTranslator/gui/showword.py b/LunaTranslator/LunaTranslator/gui/showword.py index 733d7966..b62e955d 100644 --- a/LunaTranslator/LunaTranslator/gui/showword.py +++ b/LunaTranslator/LunaTranslator/gui/showword.py @@ -251,7 +251,12 @@ class AnkiWindow(QWidget): def loadfileds(self): word = self.currentword - explain = json.dumps(gobject.baseobject.searchwordW.generate_explains()) + explain = json.dumps( + json.dumps( + gobject.baseobject.searchwordW.generate_explains(), ensure_ascii=False + ), + ensure_ascii=False, + ) remarks = self.remarks.toHtml() example = self.example.toPlainText() ruby = self.ruby @@ -531,7 +536,13 @@ class AnkiWindow(QWidget): def reset(self, text): self.currentword = text if text and len(text): - self.ruby = json.dumps(gobject.baseobject.translation_ui.parsehira(text)) + self.ruby = json.dumps( + json.dumps( + gobject.baseobject.translation_ui.parsehira(text), + ensure_ascii=False, + ), + ensure_ascii=False, + ) else: self.ruby = "" self.editpath.clear() diff --git a/LunaTranslator/files/anki/back.html b/LunaTranslator/files/anki/back.html index 8ea4c4d6..e3aad4a3 100644 --- a/LunaTranslator/files/anki/back.html +++ b/LunaTranslator/files/anki/back.html @@ -8,7 +8,7 @@