private String validateEncoding(String encoding) {
		return (encoding == null) ? Charset.defaultCharset().name() : Charset.forName(encoding.trim()).name();
	}
Validates the given encoding.

@return  the validated encoding. If {@code null} was provided, returns the platform default encoding.
antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java