Re: [dev] [st utf8 1/4] Use utf8len instead of utf8decode.

From: <>
Date: Tue, 21 Apr 2015 21:47:07 +0000

First two patches can be applied. The second patch is not mine, I just
cherry-picked it from wchar branch.

Third patch changes internal representation in Glyph and makes it work.
Fourth patch changes some functions mostly in the way already done in
wchar branch.

The general idea is to decode UTF-8 when reading from tty or
clipboard and encode to UTF-8 when writing to terminal or clipboard.

One problem is CSI and STR sequences. Now they are stored encoded to
UTF-8 and i am not sure it should be changed because it makes it
possible to use atoi to parse arguments. So tputc still encodes the
character that was decoded a bit earlier.

However, the code becomes simplier this way, lots of ugly '.c[0]' are
replaced by '.u' and utf8len is removed. I think these patches can
already be applied.
Received on Tue Apr 21 2015 - 23:47:07 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 21 2015 - 23:48:36 CEST