code: public void setCharacterEncoding(String encoding,boolean setField)
      {
          if (isCommitted())
              return;
          
          if (encoding==null)
          {
              // Clear any encoding.
              if (_characterEncoding!=null)
              {
                  _characterEncoding=null;
                  if (setField)
                      _header.put(HttpFields.__ContentType,_mimeType);
              }
          }
          else
          {
              // No, so just add this one to the mimetype
              _characterEncoding=encoding;
              if (setField && _mimeType!=null)
              {
                      _header.put(HttpFields.__ContentType,
                              	_mimeType+";charset="+
                              	QuotedStringTokenizer.quote(_characterEncoding,";= "));
              }
          }
      }
docs: Set Character Encoding.
  @param encoding An encoding that can override the encoding set
  from the ContentType field.