OSDN Git Service

Support displaying Unicode text
authorSteven Luo <steven+android@steven676.net>
Sat, 1 Oct 2011 05:48:35 +0000 (22:48 -0700)
committerJack Palevich <jack.palevich@gmail.com>
Sun, 9 Oct 2011 22:09:50 +0000 (15:09 -0700)
commite91bb8924d7d5711251b6e02bf9010f33622d56e
tree2e09cf422b39c7e1d448443d86e597f87a750b6d
parent7117c41e8bfc2165009b8a3688fecbaaac036f6e
Support displaying Unicode text

The current scheme, whereby we store the contents of our screen in an
array of char (two bytes in Java) with the upper byte used to encode
color and formatting information, is fundamentally incompatible with
Unicode, where the available encodings all either need more than one
byte per character or are variable-length encodings.

Instead, we use a new UnicodeTranscript class, which stores the
transcript row by row and includes facilities to handle combining
characters and East Asian wide characters.

We also need to make some minor changes to the code which displays text
on screen to support Unicode output.

Signed-off-by: Jack Palevich <jack.palevich@gmail.com>
src/jackpal/androidterm/EmulatorView.java
src/jackpal/androidterm/model/Screen.java
src/jackpal/androidterm/model/TextRenderer.java
src/jackpal/androidterm/session/TerminalEmulator.java
src/jackpal/androidterm/session/TranscriptScreen.java