code: @Override
      public synchronized void setEncoding(String encoding)
                          throws SecurityException, java.io.UnsupportedEncodingException {
          super.setEncoding(encoding);
          if (output == null) {
              return;
          }
          // Replace the current writer with a writer for the new encoding.
          flush();
          if (encoding == null) {
              writer = new OutputStreamWriter(output);
          } else {
              writer = new OutputStreamWriter(output, encoding);
          }
      }
docs: Set (or change) the character encoding used by this <tt>Handler</tt>.
  <p>
  The encoding should be set before any <tt>LogRecords</tt> are written
  to the <tt>Handler</tt>.
  
  @param encoding  The name of a supported character encoding.
  May be null, to indicate the default platform encoding.
  @exception  SecurityException  if a security manager exists and if
  the caller does not have <tt>LoggingPermission("control")</tt>.
  @exception  UnsupportedEncodingException if the named encoding is
  not supported.