From 47866cd8d20c62afa8a3c3929d3aada2db9162f5 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 9 Jan 2025 17:28:27 +0100 Subject: refactor: delete duplicate utf8-functionality Also remove British National Replacement Character Set. We keep the DEC Special Graphics and ASCII despite it not being unicode as some old software such as calcurse still rely on this functionality. References: - https://github.com/neovim/neovim/pull/31934#discussion_r1911046426 - https://en.wikipedia.org/wiki/DEC_Special_Graphics - https://vt100.net/docs/vt220-rm/chapter2.html#S2.4.3 --- src/nvim/vterm/encoding.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/nvim/vterm') diff --git a/src/nvim/vterm/encoding.c b/src/nvim/vterm/encoding.c index cc3208cfa2..f9061e8e50 100644 --- a/src/nvim/vterm/encoding.c +++ b/src/nvim/vterm/encoding.c @@ -210,6 +210,7 @@ static void decode_table(VTermEncoding *enc, void *data, uint32_t cp[], int *cpi } } +// https://en.wikipedia.org/wiki/DEC_Special_Graphics static const struct StaticTableEncoding encoding_DECdrawing = { { .decode = &decode_table }, { @@ -247,13 +248,6 @@ static const struct StaticTableEncoding encoding_DECdrawing = { } }; -static const struct StaticTableEncoding encoding_uk = { - { .decode = &decode_table }, - { - [0x23] = 0x00a3, // £ - } -}; - static struct { VTermEncodingType type; char designation; @@ -262,7 +256,6 @@ static struct { encodings[] = { { ENC_UTF8, 'u', &encoding_utf8 }, { ENC_SINGLE_94, '0', (VTermEncoding *)&encoding_DECdrawing }, - { ENC_SINGLE_94, 'A', (VTermEncoding *)&encoding_uk }, { ENC_SINGLE_94, 'B', &encoding_usascii }, { 0 }, }; -- cgit