try {
out.write(Integer.parseInt(new String(textBytes, i + 2, 2), 16));
i += 2;
} catch (Exception e) {
String msg = GoIntentionsBundle.message("error.unknown.escape.sequence", (char) b);
throw new IntentionExecutionException(msg, i, 2);
}
break;
case 'u':
case 'U':
int len = b == 'u' ? 4 : 8;
try {
int codePoint = Integer.parseInt(new String(textBytes, i + 2, len), 16);
out.write(new String(Character.toChars(codePoint)).getBytes(Charsets.UTF_8));
i += len;
} catch (Exception e) {
String msg = GoIntentionsBundle.message("error.unknown.escape.sequence", (char) b);
throw new IntentionExecutionException(msg, i, 2);
}
break;
default:
String msg = GoIntentionsBundle.message("error.unknown.escape.sequence", (char) b);
throw new IntentionExecutionException(msg, i, 2);
}
i++;
}
out.write('`');
}