code: private static Charset getCharset(final int flags) throws AuthenticationException
      {
          if ((flags & FLAG_REQUEST_UNICODE_ENCODING) == 0) {
              return DEFAULT_CHARSET;
          } else {
              if (UNICODE_LITTLE_UNMARKED == null) {
                  throw new AuthenticationException( "Unicode not supported" );
              }
              return UNICODE_LITTLE_UNMARKED;
          }
      }
docs: Find the character set based on the flags.
  @param flags is the flags.
  @return the character set.