diff --git a/nw/config.py b/nw/config.py index dbe6c3c5..6baf30a2 100644 --- a/nw/config.py +++ b/nw/config.py @@ -87,8 +87,8 @@ class Config: self.doReplaceDots = True self.wordCountTimer = 5.0 - self.fmtSingleQuotes = ["‘","’"] - self.fmtDoubleQuotes = ["“","”"] + self.fmtSingleQuotes = ["\u2018","\u2019"] + self.fmtDoubleQuotes = ["\u201c","\u201d"] self.spellLanguage = "en_GB" diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index 88d2460f..3ecc9f3c 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -422,15 +422,15 @@ class GuiDocEditor(QTextEdit): elif self.mainConf.doReplaceDash and theTwo == "--": theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 2) - theCursor.insertText("–") + theCursor.insertText("\u2013") - elif self.mainConf.doReplaceDash and theTwo == "–-": + elif self.mainConf.doReplaceDash and theTwo == "\u2013-": theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 2) - theCursor.insertText("—") + theCursor.insertText("\u2014") elif self.mainConf.doReplaceDots and theThree == "...": theCursor.movePosition(QTextCursor.Left, QTextCursor.KeepAnchor, 3) - theCursor.insertText("…") + theCursor.insertText("\u2026") return