diff options
author | bptato <nincsnevem662@gmail.com> | 2023-05-19 01:50:17 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-05-19 01:50:17 +0200 |
commit | 26e8968a6499742cf37e00292a7d1c8ed620cad5 (patch) | |
tree | a3922f02f09b5c025dddcfe0e7a3a719c47ba4da /src/render | |
parent | dac6a09c14b258ed725dcb265305a6445edc02ad (diff) | |
download | chawan-26e8968a6499742cf37e00292a7d1c8ed620cad5.tar.gz |
Add display/output encoding
Some encodings are still missing
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/rendertext.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/render/rendertext.nim b/src/render/rendertext.nim index d0576c75..ed79d60f 100644 --- a/src/render/rendertext.nim +++ b/src/render/rendertext.nim @@ -21,6 +21,8 @@ proc newStreamRenderer*(stream: Stream, charsets: seq[Charset]): StreamRenderer result.ansiparser.state = PARSE_DONE for i in countdown(charsets.high, 0): result.charsets.add(charsets[i]) + if charsets.len == 0: + result.charsets = @[DefaultCharset] let cs = result.charsets.pop() let em = if charsets.len > 0: DECODER_ERROR_MODE_FATAL |