in reply to Re^5: How to determine HTML encoding
in thread How to determine HTML encoding
You can probably tell I don't understand HTTP responses very well; I was considering this comment of yours:
That said, you don't need to do ANY of this. You just use HTTP::Response's ->decoded_content method and it will decode the content for you.
I was trying to figure out how to do that, but wasn't able to figure it out from reading the documentation. In any event, back to Plan A:
print join " ", LWP::UserAgent->new->get("$url")->content_type, $/;
Oddly enough that works, but only returns this:
content type: text/html
The charset is not included, although when I use the same call on the MS or Google sites as in your example, it does.
Confused? yes. :-(
Thanks for your patience, and apologies for not getting it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: How to determine HTML encoding
by ikegami (Patriarch) on Jul 01, 2010 at 17:31 UTC |