Re: UTF-8 problems with CGI script

Stephen Collyer <[email protected]> Thu, 06 Oct 2005 12:07:11 +0100
Newsgroups gmane.text.xml.xerces-p.devel
Message-ID <[email protected]>
Jason E. Stewart wrote:
> Stephen Collyer <[email protected]> writes:
> 
> 
>>I've run into a pretty nasty problem with XML::Xerces
>>when parsing in a CGI script using a SAX2 parser: in brief,
>>the parser seems to ignore totally any character data in a
>>document that contains UTF-8 characters.
> 
> 
> Hi Stephen,
> 
> Yes, I think I know exactly what this is.
> 
> While preparing for the 2.6 release I stumbled upon an obvious bug in
> the callback handlers - i.e. SAX2 character parsers. They are
> transcoding into ASCII by default, and I have not provided a way to
> override that, so everything will get tossed.

Right. That wouldn't explain why the parser only fails in a CGI
script though, would it ? I seem to have no problems in a command
line environment, though I'm baffled as to why.

> Stephen, could you send an example file and a short program that
> demonstrates the problem? That would make it even simpler for me to
> test that things are working as they should.

Sure. I'll put together an LWP based sending script, and a corresponding
CGI script, together with a command line script that works OK.

May be a day or two till I do it though.

Thanks for the rapid response.

-- 
Regards

Stephen Collyer
Netspinner Ltd