Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread Paul Lindner
On Tue, May 07, 2002 at 11:13:43AM -0400, John Siracusa wrote: > On 5/7/02 10:58 AM, Paul Lindner wrote: > > The output from your example looks like UTF-8 data (Ã is a > > commonly seen UTF-8 escape sequence). XML::Parser converts all > > incoming text into UTF-8. You will need to convert it bac

Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread John Siracusa
On 5/7/02 11:25 AM, Gisle Aas wrote: > John Siracusa <[EMAIL PROTECTED]> writes: >> On 5/7/02 10:58 AM, Paul Lindner wrote: >>> The output from your example looks like UTF-8 data (Ã is a >>> commonly seen UTF-8 escape sequence). XML::Parser converts all >>> incoming text into UTF-8. You will nee

Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread Gisle Aas
John Siracusa <[EMAIL PROTECTED]> writes: > On 5/7/02 10:58 AM, Paul Lindner wrote: > > The output from your example looks like UTF-8 data (Ã is a > > commonly seen UTF-8 escape sequence). XML::Parser converts all > > incoming text into UTF-8. You will need to convert it back to > > iso-8859-1.

Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread John Siracusa
On 5/7/02 11:06 AM, Rafael Garcia-Suarez wrote: > The workaround I used is to write the handler like this : > > sub xml_char > { > my ($expat) = @_; > $buffer .= $expat->original_string; > } > > Reading the original string, no need to convert UTF-8 back to iso-8859-1. Doh! I dunno why I didn

Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread John Siracusa
On 5/7/02 10:58 AM, Paul Lindner wrote: > The output from your example looks like UTF-8 data (Ã is a > commonly seen UTF-8 escape sequence). XML::Parser converts all > incoming text into UTF-8. You will need to convert it back to > iso-8859-1. > > My favorite is Text::Iconv > >use Text

Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread Rafael Garcia-Suarez
John Siracusa wrote: > I ran into this problem during mod_perl development, and I'm posting it to > this list hoping that other mod_perl developers have dealt with the same > thing and have good solutions :) I did ;-) > I've found that strings collected while processing XML using XML::Parser do

Re: HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread Paul Lindner
The output from your example looks like UTF-8 data (Ã is a commonly seen UTF-8 escape sequence). XML::Parser converts all incoming text into UTF-8. You will need to convert it back to iso-8859-1. My favorite is Text::Iconv use Text::Iconv; $utf8tolatin1 = Text::Iconv->new("UT

HTML::Entities chokes on XML::Parser strings

2002-05-07 Thread John Siracusa
I ran into this problem during mod_perl development, and I'm posting it to this list hoping that other mod_perl developers have dealt with the same thing and have good solutions :) I've found that strings collected while processing XML using XML::Parser do not play nice with the HTML::Entities mo