From b133a8be77cd1bd513206e0dd488c526e240da2f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 31 Aug 2022 09:44:34 -0700 Subject: RTF writer: add space after unicode escape commands. Otherwise the `?` character that is there as a fallback for systems that can't process the unicode will be interpreted as the paramater's delimiter, and the NEXT character will be gobbled instead of `?`. Closes #8264 (fixes a problem with disappearing characters after unicode escapes). --- src/Text/Pandoc/Writers/RTF.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index ff0f4cef2..ad91b46ec 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -134,7 +134,7 @@ handleUnicode = T.concatMap $ \c -> where surrogate x = not ( (0x0000 <= ord x && ord x <= 0xd7ff) || (0xe000 <= ord x && ord x <= 0xffff) ) - enc x = "\\u" <> tshow (ord x) <> "?" + enc x = "\\u" <> tshow (ord x) <> " ?" -- | Escape special characters. escapeSpecial :: Text -> Text -- cgit v1.2.3