From 7f944ae18b9d82161ace58adfdde73a1202fffc8 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 29 Apr 2024 23:15:26 +0800 Subject: [PATCH] fix --- pygmt/encodings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pygmt/encodings.py b/pygmt/encodings.py index 32ba6bec62a..d006e1ca031 100644 --- a/pygmt/encodings.py +++ b/pygmt/encodings.py @@ -7,10 +7,11 @@ >>> >>> mappings = charset["symbol"] >>> +>>> undefined = "\ufffd" >>> markdown = "| octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |\n" >>> markdown += "|---|---|---|---|---|---|---|---|---|\n" >>> for i in range(0o040, 0o400, 8): -... chars = [f'&#x{ord(mappings.get(i, "\ufffd")):04x};' for i in range(i, i + 8)] +... chars = [f"&#x{ord(mappings.get(i, undefined)):04x};" for i in range(i, i + 8)] ... if all(c == chars[0] for c in chars): ... continue ... row = f"\\{i:03o}"[:-1] + "x"