Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to encode utf-8 string in Quoted Printable?

Reply
Thread Tools Display Modes

How to encode utf-8 string in Quoted Printable?

 
 
rex
Guest
Posts: n/a

 
      11-11-2006, 11:12 PM
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?


 
Reply With Quote
 
 
 
 
Thomas Schodt
Guest
Posts: n/a

 
      11-12-2006, 07:26 AM
rex wrote:
> 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?


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.
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
recv() till particular string Harry Linux Networking 2 06-22-2007 04:19 PM
netfilter string match Eric Linux Networking 7 11-11-2005 04:54 PM
connect string Arruba Wireless Networks 4 09-10-2004 02:57 PM
Two PCs, one piece of wet string nic Home Networking 15 05-23-2004 01:14 PM
-m --string with 3 different strings Marcel Linux Networking 0 06-25-2003 10:25 AM



1 2 3 4 5 6 7 8 9 10 11