diff --git a/src/org/rascalmpl/repl/TerminalProgressBarMonitor.java b/src/org/rascalmpl/repl/TerminalProgressBarMonitor.java index d7c82f75873..9ce64b9a802 100644 --- a/src/org/rascalmpl/repl/TerminalProgressBarMonitor.java +++ b/src/org/rascalmpl/repl/TerminalProgressBarMonitor.java @@ -288,7 +288,9 @@ private static class ANSI { static boolean isUTF8enabled(PrintWriter writer, InputStream in) { try { int pos = getCursorPosition(writer, in); - writer.write("あ"); + // Japanese A (あ) is typically 3 bytes in most encodings, but should be less than 3 ANSI columns + // on screen if-and-only-if unicode is supported. + writer.write("あ"); writer.flush(); int newPos = getCursorPosition(writer, in); int diff = newPos - pos;