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:
parent
dec3c0f563
commit
19716c0ca7
1 changed files with 11 additions and 4 deletions
|
@ -578,12 +578,19 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
|
|||
//
|
||||
// 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(byteToSend);
|
||||
os.write(bytesToSend);
|
||||
} else {
|
||||
Logger.log("sending '" + byteToSend + "'"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
os.write(byteToSend);
|
||||
byte[] bytesToSend = String.valueOf(chKey).getBytes(fEncoding);
|
||||
for (int i = 0; i < bytesToSend.length; i++) {
|
||||
Logger.log("sending '" + bytesToSend[i] + "'"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
os.write(bytesToSend);
|
||||
}
|
||||
os.flush();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue