Various charset related fixes

Fix changing of charset not taking effect immediately while parsing a
single block of bytes

Fix incorrect mapping of C0 control codes in some of the charsets
This commit is contained in:
Kovid Goyal
2016-11-30 19:44:41 +05:30
parent c713712f89
commit ce1514963b
6 changed files with 44 additions and 42 deletions

View File

@@ -69,6 +69,12 @@ class TestParser(BaseTest):
pb('\033c123', ('screen_reset', ), '123')
self.ae(str(s.line(0)), '123 ')
def test_charsets(self):
s = self.create_screen()
pb = partial(self.parse_bytes_dump, s)
pb('\033)0\x0e/_', ('screen_designate_charset', 1, ord('0')), ('screen_change_charset', 1), '/\xa0')
pb('\033%G_', ('screen_change_charset', 2), '_')
def test_csi_codes(self):
s = self.create_screen()
pb = partial(self.parse_bytes_dump, s)