1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Terminal: Fix Bug 448144 - accent characters do not work correctly

Encode the byte to send for the currently selected encoding before
sending it to the terminal.

Change-Id: I0ed295163c6e5dd2fde19b8b562d76a8d775a78b
This commit is contained in:
Uwe Stieber 2015-02-20 10:09:47 +01:00
parent dec3c0f563
commit 19716c0ca7

View file

@ -578,12 +578,19 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
// //
// TODO: Make the ESCAPE-vs-highbit behavior user configurable. // TODO: Make the ESCAPE-vs-highbit behavior user configurable.
Logger.log("sending ESC + '" + byteToSend + "'"); //$NON-NLS-1$ //$NON-NLS-2$ byte[] bytesToSend = String.valueOf(chKey).getBytes(fEncoding);
Logger.log("sending ESC "); //$NON-NLS-1$
for (int i = 0; i < bytesToSend.length; i++) {
Logger.log("+ '" + bytesToSend[i] + "'"); //$NON-NLS-1$ //$NON-NLS-2$
}
os.write('\u001b'); os.write('\u001b');
os.write(byteToSend); os.write(bytesToSend);
} else { } else {
Logger.log("sending '" + byteToSend + "'"); //$NON-NLS-1$ //$NON-NLS-2$ byte[] bytesToSend = String.valueOf(chKey).getBytes(fEncoding);
os.write(byteToSend); for (int i = 0; i < bytesToSend.length; i++) {
Logger.log("sending '" + bytesToSend[i] + "'"); //$NON-NLS-1$ //$NON-NLS-2$
}
os.write(bytesToSend);
} }
os.flush(); os.flush();
} }