On Fri 20.Feb'09 at 14:46:49 -0500, Todd Chapman wrote: > The attached script and input file trigger the error. I think the > problem is the loop on @lines. The BOM is only in the first line so > the rest is cornfused. If you're up for actually rewriting that as a test file that loads the data and checks what it creates, I'm game for trying to debug it. > > > > On Fri, Feb 20, 2009 at 1:43 PM, Jesse Vincent <je...@bestpractical.com> > wrote: > >> 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. > > > > How small a test case can you get to fail like that? > > > use strict; > use warnings; > > use RT; > RT::LoadConfig(); > RT::Init(); > > use MIME::Entity; > use RT::I18N; > > my $Message = MIME::Entity->build( > Type => 'multipart/mixed', > Subject => "foo", > ); > > > open(my $filehandle, "<", "file") or die; > > my (@content,$buffer); > while ( my $bytesread = read( $filehandle, $buffer, 4096 ) ) { > push @content, $buffer; > } > > $Message->attach( > Type => "text/html", > Filename => 'myfile', > Data => \...@content, > ); > > $Message->make_singlepart; > RT::I18N::SetMIMEEntityToUTF8($Message); # convert text parts into utf-8 --
pgpNsqiqB62ZD.pgp
Description: PGP signature
_______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com