LWP's head parsing does not work with all (supported) character
encodings.
For example for
http://koti.welho.com/vskytta/utf16le.html (served as
text/html without charset parameter, UTF-16LE with byte-order mark, file
also attached) the "Title" header does not get populated but a warning
"Parsing of undecoded UTF-16 at [...]" is emitted. I think the same
would happen if there was no BOM but the encoding was specified in the
Content-Type header's charset parameter but I have no test case
available for that at the moment.
I suppose some kind of preprocessing would be needed before docs are fed
to HTML::HeadParser in parse_head(). New versions of LWP seem to have
the necessary functionality for this preprocessing/decoding, it should
just be used here.
(Aside, I suppose HTML::(Head)Parser could just handle the BOM cases
automatically as it already recognizes the BOMs...)