MudaliarArun / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

Terminal emulation doesn't support combining characters #186

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Some languages (e.g. Thai, Hindi, etc.) rely heavily on combining
characters for writing.

Current ConnectBot's terminal emulation will only support combining
characters that can be precomposed. This makes writing in languages that
rely on combining characters that can't be precomposed impossible.

Currently there are 8 bits left in VDUBuffer's charAttributes array which
could be used to indicate an offset and length of combiners in a combining
character buffer.

Ideas would be something like 3 bits for length, allowing 7 combiners, and
5 bits for offset (32 addressable positions), where the offset would be
appropriately scaled to match the width of the terminal (e.g., left shifted
by 1 or more).

Original issue reported on code.google.com by kenny@the-b.org on 17 Aug 2009 at 3:13

GoogleCodeExporter commented 8 years ago
Why not a count of character cells, rather than pixels? That way no shift is 
needed,
and the screen needs to remain cell-addressable anyhow.

Original comment by bsittler@google.com on 23 Dec 2009 at 10:33

GoogleCodeExporter commented 8 years ago
By the way, this and many other of the terminal emulation issues reported, 
could all be solved by using a better terminal emulation library.

I just so happen to have written one, in pure C, which may be a better fit 
here. A small amount of JNI ought to be able to wrap that neatly for use in 
ConnectBot.

  https://launchpad.net/libvterm

I use this daily, it is the backing behind my default terminal I use for both 
work and personal use. It fully understands, among many other things, Unicode 
combining characters up to a compile-time defined limit (defaults to 6).

Original comment by pev...@google.com on 8 Jun 2012 at 1:00