From f2794ef5d63e7ce02f456d8fdee1750d404a65ea Mon Sep 17 00:00:00 2001 From: Andrew Kay Date: Mon, 1 Jul 2019 22:07:43 -0500 Subject: [PATCH] Add mappings for caret and tilde characters --- oec/display.py | 4 ++-- tests/test_display.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oec/display.py b/oec/display.py index f4de7fd..ce9716c 100644 --- a/oec/display.py +++ b/oec/display.py @@ -62,8 +62,8 @@ _ASCII_CHAR_MAP = { '¯': 0x37, # ??? '°': 0x38, # 0x39 - Accent? - # 0x3a - Accent? - # 0x3b - A tilde? It looks more like an accent... + '^': 0x3a, # More like an accent + '~': 0x3b, # More like an accent '¨': 0x3c, # 0x3d - Accute accent? # 0x3e - Opposite of accute accent? diff --git a/tests/test_display.py b/tests/test_display.py index e5aab23..38b6564 100644 --- a/tests/test_display.py +++ b/tests/test_display.py @@ -9,7 +9,7 @@ class EncodeAsciiCharacterTestCase(unittest.TestCase): self.assertEqual(encode_ascii_character(ord('a')), 0x80) def test_unmapped_character(self): - self.assertEqual(encode_ascii_character(ord('^')), 0x00) + self.assertEqual(encode_ascii_character(ord('`')), 0x00) def test_out_of_range(self): self.assertEqual(encode_ascii_character(ord('✓')), 0x00)