private static final EscapeStrategy chooseStrategy(String encoding) {
		if ("UTF-8".equalsIgnoreCase(encoding) ||
				"UTF-16".equalsIgnoreCase(encoding)) {
			return UTFEscapeStrategy;
		}
		
		if (encoding.toUpperCase().startsWith("ISO-8859-") ||
				"Latin1".equalsIgnoreCase(encoding)) {
			return Bits8EscapeStrategy;
		}
		
		if ("US-ASCII".equalsIgnoreCase(encoding) ||
				"ASCII".equalsIgnoreCase(encoding)) {
			return Bits7EscapeStrategy;
		}

		try {
			final CharsetEncoder cse = Charset.forName(encoding).newEncoder();
			return new DefaultCharsetEscapeStrategy(cse);
		} catch (Exception e) {
			// swallow that... and assume false.
		}
		return DefaultEscapeStrategy;
	}