Re: enabling utf8 encoding for sax parer XML::SAX::Expat

Michael Ludwig <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
Robin Berjon schrieb:
> On Apr 29, 2009, at 10:19 , Michael Ludwig wrote:
>>> $userAgent->request($request, $file) ?
>>>
>>> should i add any sort of HTTP header with encoding like the ones
>>> returned in HTTP responses?
>> You should indicate the encoding in the Content-Type, yes.
>
> In the response, yes, but I think the OP is asking about the request
> headers.

The problem I ran into involved POSTing an XML document, and setting
the Content-Type for a POST certainly isn't bad practice, provided, of
course, that it actually matches the content.

> Unless LWP does something really counter-intuitive, specifying the
> Content-Type on the request object shouldn't do anything useful.

I assume you mean with respect to the payload, like converting it?
No, I think it is up to the user to make content and headers match.
LWP doesn't do anything counter-intuitive here.

The gotcha for me was the one I described, where you have to make sure
to pass the contents as a string of octets, as opposed to a string of
characters. But no, I can't be sure this is actually the same problem
the OP is running into.

Michael Ludwig
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.