Re: MIME::QuotedPrint - extra '=' and linebreak?



Gunnar Hjalmarsson <noreply@xxxxxxxxx> wrote:
op wrote:
when it comes to character encodings I decided to let myself off
the hook and use a module, namely MIME::QuotedPrint.

<snip>

However, the module didn't quite produce the result I expected. It
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.

Not 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.

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, "") . "?=";

Jenda
===== Jenda@xxxxxxxxxxx === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

.



Relevant Pages

  • Merry Christmas!
    ... dictionaries and every variant possibility has a separate "word" entry. ... The byte string of the "word", whose length is specified by a four ... match is found for a source byte sequence in the dictionary. ...
    (rec.arts.sf.written)
  • Merry Christmas! Linux RULES! New applications to develop!
    ... dictionaries and every variant possibility has a separate "word" ... Each entry in the dictionary contains: ... The byte string of the "word", whose length is specified by a four ... addresses whose entry is selected by the first byte of the sequence. ...
    (comp.os.linux.misc)
  • Re: user defined function that converts string to float
    ... > I need user defined function that converts string to float in c. ... initial, possibly empty, sequence of white-space characters (as ... point character, then an optional exponent part as defined in ... then a nonempty sequence of hexadecimal digits ...
    (comp.lang.c)
  • Re: Coin tossing guessing strategy...
    ... You need a precise string in exactly one order, ... with respect to sequences of n flips, is to note that if some sequence ... In fact, assuming a fair coin, all 10 coin sequences are equally ... heads and tails. ...
    (sci.math)
  • Re: Coin tossing guessing strategy...
    ... You need a precise string in exactly one order, ... with respect to sequences of n flips, is to note that if some sequence ... In fact, assuming a fair coin, all 10 coin sequences are equally ... heads and tails. ...
    (sci.math)