public static String getANTLRCharLiteralForChar(int c) {
		String result;
		if ( c < Lexer.MIN_CHAR_VALUE ) {
			result = "<INVALID>";
		}
		else {
			String charValueEscape = c < ANTLRLiteralCharValueEscape.length ? ANTLRLiteralCharValueEscape[c] : null;
			if (charValueEscape != null) {
				result = charValueEscape;
			}
			else if (Character.UnicodeBlock.of((char) c) == Character.UnicodeBlock.BASIC_LATIN &&
					!Character.isISOControl((char) c)) {
				if (c == '\\') {
					result = "\\\\";
				}
				else if (c == '\'') {
					result = "\\'";
				}
				else {
					result = Character.toString((char) c);
				}
			}
			else if (c <= 0xFFFF) {
				result = String.format("\\u%04X", c);
			} else {
				result = String.format("\\u{%06X}", c);
			}
		}
		return '\'' + result + '\'';
	}
Return a string representing the escaped char for code c.  E.g., If c
 has value 0x100, you will get "\\u0100".  ASCII gets the usual
 char (non-hex) representation.  Non-ASCII characters are spit out
 as \\uXXXX or \\u{XXXXXX} escapes.
tool/src/org/antlr/v4/misc/CharSupport.java