private static String escapeChar(char input, char usedQuote) {
		if (input == usedQuote)
			return "\\" + usedQuote;

		switch (input) {
		case '\\':
			return "\\\\";
		case '\b':
			return "\\b";
		case '\f':
			return "\\f";
		case '\n':
			return "\\n";
		case '\r':
			return "\\r";
		case '\t':
			return "\\t";
		default:
			// TODO Allow the user to set a flag which generates a \\uXXXX
			// sequence for non standard characters
			return "" + input;
		}
	}