Re: Doing character encoding/decoding within libwww?
Bill Moseley <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Sep 23, 2007 at 01:22:21AM +0200, Bjoern Hoehrmann wrote:
> * Bill Moseley wrote:
> >sub decoded_content {
> > ....
> >
> > $content_ref = \Encode::decode($charset, $$content_ref,
> > Encode::FB_CROAK() | Encode::LEAVE_SRC());
>
> The documentation I re-read earlier even says that... This is still a
> far cry from being generally useful though, it only works for text/*
> and only if the encoding is specified in the header, or the format does
> not use some kind of inline label that is inconsistent with the default.
> Most of the time this is not the case, however.
It will also find <meta> content-type in the markup, IIRC.
It's been a long day. What other mime types are you thinking of other
than text/*?
--
Bill Moseley
[email protected]