[rt-users] RT 3.8 mangles html attachment
Todd Chapman
todd at chaka.net
Fri Feb 20 13:34:52 EST 2009
On Fri, Feb 20, 2009 at 1:04 PM, Jesse Vincent <jesse at bestpractical.com> wrote:
>
>
>
> On Thu 19.Feb'09 at 13:48:48 -0500, Todd Chapman wrote:
>> Well, what does the database say for content-type? Is the content in the
>> database 'right'?
>>
>> Sorry. And thanks again for all the help!
>>
>> mysql> select Subject, Filename, ContentType, ContentEncoding, Headers
>> from Attachments where id=10792\G
>> X-Mailer: MIME-tools 5.426 (Entity 5.426)
>> Content-Type: text/html;
>> charset="utf-8";
>> Content-Transfer-Encoding: binary
>> X-RT-Original-Encoding: utf-8
>> Content-Length: 73017
>
> This really does look like our content-type sniffing for HTML probably
> wants to look inside the content for an encoding. But there's a chicken
> and egg problem there.
>
> I think you probably want to see if Encode::Guess does the right thing
> with your utf-16 html. If so, then it might be a problem in how RT uses
> it.
>
> I look forward to further triage.
>
Hmmm. Just noticed this error:
[Fri Feb 20 18:32:55 2009] [debug]: Converting 'UTF-16' to 'utf-8' for
text/html - Re Eprize RPC interface failing on DC registration.htm
(/opt/rt3-devel/bin/../lib/RT/I18N.pm:234)
[Fri Feb 20 18:32:55 2009] [error]: Encoding error:
UTF-16:Unrecognised BOM 78 at
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Encode.pm line 190.
And just found this in production:
Feb 19 10:39:28 c0sup-rt02 RT: Encoding error: UTF-16:Unrecognised BOM
78 at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Encode.pm line
190. Stack: [/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Encode.pm:190]
[/opt/rt3/bin/../lib/RT/I18N.pm:235]
[/opt/rt3/bin/../lib/RT/I18N.pm:153]
[/opt/rt3/bin/../lib/RT/Interface/Web.pm:853]
[/opt/rt3/share/html/Ticket/Update.html:308]
[/opt/rt3/share/html/autohandler:311] defaulting to ISO-8859-1 ->
UTF-8 (/opt/rt3/bin/../lib/RT/I18N.pm:239)
Word putting in an invalid BOM? I upgraded Encode from 2.26 to 2.31
but it had no effect.
More information about the rt-users
mailing list