public static String normalizeCharset(String s, int offset, int length) {
        String n = CHARSETS.get(s, offset, length);
        return (n == null) ? s.substring(offset, offset + length) : n;
    }
public static String normalizeCharset ( String s , int offset , int length ) { String n = CHARSETS . get ( s , offset , length ) ; return ( n == null ) ? s . substring ( offset , offset + length ) : n ; }
Convert alternate charset names (eg utf8) to normalized name (eg UTF-8).

@param s      the charset to normalize
@param offset the offset in the charset
@param length the length of the charset in the input param
@return the normalized charset (or null if not found)