src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Curses.java
changeset 58903 eeb1c0da2126
parent 52938 5ff7480c9e28
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Curses.java	Mon Nov 04 14:26:18 2019 +0800
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Curses.java	Mon Nov 04 09:40:35 2019 +0100
@@ -4,7 +4,7 @@
  * This software is distributable under the BSD license. See the terms of the
  * BSD license in the documentation provided with this software.
  *
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
  */
 package jdk.internal.org.jline.utils;
 
@@ -74,8 +74,16 @@
             switch (ch) {
                 case '\\':
                     ch = str.charAt(index++);
-                    if (ch >= '0' && ch <= '9') {
-                        throw new UnsupportedOperationException(); // todo
+                    if (ch >= '0' && ch <= '7') {
+                        int val = ch - '0';
+                        for (int i = 0; i < 2; i++) {
+                            ch = str.charAt(index++);
+                            if (ch < '0' || ch > '7') {
+                                throw new IllegalStateException();
+                            }
+                            val = val * 8 + (ch - '0');
+                        }
+                        out.append((char) val);
                     } else {
                         switch (ch) {
                             case 'e':