code: @Override
    public void write(ByteAppendable os, char ch)
      throws IOException
    {
      if (ch < 0x80) {
        os.write(ch);
      }
      else if (ch < 0x800) {
        os.write((0xc0 + (ch >> 6)));
        os.write((0x80 + (ch & 0x3f)));
      }
      else {
        os.write((0xe0 + (ch >> 12)));
        os.write((0x80 + ((ch >> 6) & 0x3f)));
        os.write((0x80 + (ch & 0x3f)));
      }
    }
docs: Writes a character to the output stream with the correct encoding.
  
  @param ch the character to write.