Force enabling UTF-8 mode

This commit is contained in:
simonpunk 2020-01-09 14:00:38 +08:00
parent 0ee3be8b55
commit 3bfc2a603f
2 changed files with 4 additions and 3 deletions

View File

@ -247,6 +247,7 @@ public class TermSession {
public void initializeEmulator(int columns, int rows) {
mTranscriptScreen = new TranscriptScreen(columns, TRANSCRIPT_ROWS, rows, mColorScheme);
mEmulator = new TerminalEmulator(this, mTranscriptScreen, columns, rows, mColorScheme);
mDefaultUTF8Mode = true;
mEmulator.setDefaultUTF8Mode(mDefaultUTF8Mode);
mEmulator.setKeyListener(mKeyListener);

View File

@ -388,9 +388,9 @@ class TerminalEmulator {
* UTF-8 support
*/
private static final int UNICODE_REPLACEMENT_CHAR = 0xfffd;
private boolean mDefaultUTF8Mode = false;
private boolean mUTF8Mode = false;
private boolean mUTF8EscapeUsed = false;
private boolean mDefaultUTF8Mode = true;
private boolean mUTF8Mode = true;
private boolean mUTF8EscapeUsed = true;
private int mUTF8ToFollow = 0;
private ByteBuffer mUTF8ByteBuffer;
private CharBuffer mInputCharBuffer;