Re: MIME::QuotedPrint - extra '=' and linebreak?
- From: noreply@xxxxxxxxx (Gunnar Hjalmarsson)
- Date: Mon, 30 Jun 2008 01:33:10 +0200
Jenda Krynicky wrote:
Gunnar Hjalmarsson <noreply@xxxxxxxxx> wrote:op wrote:when it comes to character encodings I decided to let myself off<snip>
the hook and use a module, namely MIME::QuotedPrint.
However, the module didn't quite produce the result I expected. ItNot quite. Without further arguments to encode_qp() it splits up long lines with "=\n" in between. I haven't noticed any "=\n" at the end of the encoded string, though.
correctly encoded the non-ASCII characters to '=<1byte_hexcode>', but
unexpectedly also added an extra '=\n' sequence to the end of the
string I was encoding.
You said that yourself ... without further arguments ...
I have made a similar experience, and my "hack" is even more complicated:
$encoded = join "\n ",
map { tr/ /_/; "=?ISO-8859-15?Q?$_?=" }
split /\s*=\n\s*/, $encoded;
When sending a long subject header via a sendmail pipe, that code makes at least my email client (Thunderbird) happy...
so I do not understand why don't you use
"=?ISO-8859-15?Q?" . encode_qp($raw_data, "") . "?=";
Actually I have done that, too. But I fear that very long subject lines might mess up the message, so making use of the "=\n" that MIME::QuotedPrint generates seems like a good idea.
Maybe I'm wrong...
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
.
- References:
- MIME::QuotedPrint - extra '=' and linebreak?
- From: Op
- Re: MIME::QuotedPrint - extra '=' and linebreak?
- From: Gunnar Hjalmarsson
- Re: MIME::QuotedPrint - extra '=' and linebreak?
- From: Jenda Krynicky
- MIME::QuotedPrint - extra '=' and linebreak?
- Prev by Date: Re: Limiting Toke::Parser
- Next by Date: looping
- Previous by thread: Re: MIME::QuotedPrint - extra '=' and linebreak?
- Next by thread: looping
- Index(es):
Relevant Pages
|