How to encode utf-8 string in Quoted Printable?

Discussion in 'Linux Networking' started by rex, Nov 12, 2006.

  1. rex

    rex Guest

    I'm writing a mail program supporting UTF-8.
    As you know, in message headers (such as Subject) only ASCII characters are
    allowed. This is why Quoted Printable and Base64 encodings are used.
    In case of Quoted Printable it's well described in the RFCs how to encode
    strings written in ISO 8859-x codepages, such as iso-8859-2.
    But how to deal with UTF-8 strings which can contain characters represented
    by 3 or 4 bytes?
     
    rex, Nov 12, 2006
    #1
    1. Advertisements

  2. Each of these UTF-8 bytes will have the high bit turned on and will need
    to be encoded in the "=xx" QP format.
    The recipient (application) ought to decode any QP before attempting to
    interpret the header as UTF-8.
     
    Thomas Schodt, Nov 12, 2006
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.