Add mappings for caret and tilde characters

This commit is contained in:
Andrew Kay
2019-07-01 22:07:43 -05:00
parent f9ea0353fe
commit f2794ef5d6
2 changed files with 3 additions and 3 deletions

View File

@@ -62,8 +62,8 @@ _ASCII_CHAR_MAP = {
'¯': 0x37, # ??? '¯': 0x37, # ???
'°': 0x38, '°': 0x38,
# 0x39 - Accent? # 0x39 - Accent?
# 0x3a - Accent? '^': 0x3a, # More like an accent
# 0x3b - A tilde? It looks more like an accent... '~': 0x3b, # More like an accent
'¨': 0x3c, '¨': 0x3c,
# 0x3d - Accute accent? # 0x3d - Accute accent?
# 0x3e - Opposite of accute accent? # 0x3e - Opposite of accute accent?

View File

@@ -9,7 +9,7 @@ class EncodeAsciiCharacterTestCase(unittest.TestCase):
self.assertEqual(encode_ascii_character(ord('a')), 0x80) self.assertEqual(encode_ascii_character(ord('a')), 0x80)
def test_unmapped_character(self): 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): def test_out_of_range(self):
self.assertEqual(encode_ascii_character(ord('')), 0x00) self.assertEqual(encode_ascii_character(ord('')), 0x00)