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

Terminal: Fix Bug 460334 - Local terminal disconnects if typing german umlaut character

This commit is contained in:
Uwe Stieber 2015-02-20 09:43:30 +01:00
parent f811ab6852
commit dec3c0f563

View file

@ -987,19 +987,11 @@ public class VT100Emulator implements ControlListener {
String positionReport = "\u001b[" + (relativeCursorLine() + 1) + ";" + //$NON-NLS-1$ //$NON-NLS-2$
(getCursorColumn() + 1) + "R"; //$NON-NLS-1$
OutputStreamWriter streamWriter = null;
try {
streamWriter = new OutputStreamWriter(terminal.getOutputStream(), "ISO-8859-1"); //$NON-NLS-1$
streamWriter.write(positionReport, 0, positionReport.length());
streamWriter.flush();
terminal.getOutputStream().write(positionReport.getBytes("ISO-8859-1")); //$NON-NLS-1$
terminal.getOutputStream().flush();
} catch (IOException ex) {
Logger.log("Caught IOException!"); //$NON-NLS-1$
} finally {
if (streamWriter != null) {
try {
streamWriter.close();
} catch (IOException e) { /* ignored on purpose */ }
}
}
}