code: private static Charset getCharset(String charset)
      {
          try
          {
              return Charset.forName(charset);
          }
          catch (final UnsupportedCharsetException exception)
          {
              Verbose.exception(exception);
              return Charset.defaultCharset();
          }
      }
docs: Get the charset.
  
  @param charset The charset value.
  @return The charset instance.