[rt-users] Re: [rt-devel] Patch for RT 3.0.3 attachment conversion problem (2)

Autrijus Tang autrijus at autrijus.org
Thu Jun 26 06:50:23 EDT 2003


On Thu, Jun 26, 2003 at 12:36:49PM +0200, Dirk Pape wrote:
> Hello Autrijus,
> 
> --Am Donnerstag, 26. Juni 2003 12:22 Uhr +0200 schrieb Dirk Pape 
> <pape-rt at inf.fu-berlin.de>:
> 
> >and this is what I get forwarded as notification for adminCC.
> >Web display of Bild.jpg is ok, pdf corrupted.
> 
> I tried it again with a non-empty text part with the same effect.

I have found the culprit!

Encode::Guess 1.08 is broken and Encode::Guess 1.06 (the version shipped
with Perl) works.

The reason is that Encode::Guess 1.08 introduces this bogus logic:

    if ($octet =~ /\x00/o){ # if \x00 found, we assume UTF-(16|32)(BE|LE)

but in fact it may just be random binary data that happens to have
"\x00" inside it.  So if you nullify this if() condition, everything
should start working.

Cc'ing Kogai-san to try finding a solution.  Kogai-san, can we 
somehow disable this helpful guessing of "\x00", via a
$Encode::Guess::NoUTF32Guessing control variable or something?

Specifically, I think it is wrong for Guess.pm to return UTF32/16
without user explicitly setting it in the Suspects list, but I'm
willing to be convinced otherwise.

Thanks,
/Autrijus/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://pallas.eruditorum.org/pipermail/rt-devel/attachments/20030626/116b0912/attachment.pgp


More information about the Rt-devel mailing list