mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-11 18:32:12 +02:00
More charset fixes
Properly use the G0/G1 charsets only to map characters being drawn to the screen. And only decode bytes using either Latin-1 or UTF-8, defaulting to UTF-8 at startup/reset.
This commit is contained in:
@@ -72,8 +72,9 @@ class TestParser(BaseTest):
|
||||
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), '_')
|
||||
pb('\033)0\x0e/_', ('screen_designate_charset', 1, ord('0')), ('screen_change_charset', 1), '/_')
|
||||
self.ae(str(s.line(0)), '/\xa0 ')
|
||||
pb('\033%G_', ('screen_use_latin1', 0), '_')
|
||||
|
||||
def test_csi_codes(self):
|
||||
s = self.create_screen()
|
||||
|
||||
Reference in New Issue
Block a user