From 75b63f3df381a26ebec18d5d2f09aeb2638b1f7a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 27 Aug 2022 08:41:06 -0700 Subject: [PATCH] british charset --- src/terminal/charsets.zig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/terminal/charsets.zig b/src/terminal/charsets.zig index 8066fb63a..a61b3e886 100644 --- a/src/terminal/charsets.zig +++ b/src/terminal/charsets.zig @@ -3,6 +3,7 @@ const assert = std.debug.assert; /// The list of supported character sets and their associated tables. pub const Charset = enum { + british, dec_special, /// The table for the given charset. This returns a pointer to a @@ -10,11 +11,19 @@ pub const Charset = enum { /// ASCII to the given charset. pub fn table(set: Charset) []const u16 { return switch (set) { + .british => &british, .dec_special => &dec_special, }; } }; +/// https://vt100.net/docs/vt220-rm/chapter2.html +const british = british: { + var table = initTable(); + table[0x23] = 0x00a3; + break :british table; +}; + /// https://en.wikipedia.org/wiki/DEC_Special_Graphics const dec_special = tech: { var table = initTable();