UTF-8, LWP and http-equiv meta tags

Discussion in 'Perl' started by Donald Gordon, Feb 25, 2004.

  1. Hi

    I'm trying to retrieve an HTML document in UTF-8 format using LWP, but
    have hit a snag: the document redefines the Content-type: header from
    "text/html" to "text/html; charset=UTF-8" using a <meta
    http-equiv="Content-type"... /> tag. LWP doesn't pick this up, and I
    seem to be ending up with a string with UTF-8 in it, but perl thinks
    it's already been decoded.

    Is there anyway to tell perl to turn a string with bytes in it that look
    like UTF-8 into a string with real wide characters? Or a way to get LWP
    to make the problem go away?

    thanks in advance

    donald
     
    Donald Gordon, Feb 25, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bWc=?=

    META HTTP-EQUIV="Refresh"

    =?Utf-8?B?bWc=?=, Jun 30, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    574
    Teemu Keiski
    Jun 30, 2004
  2. Chumley Walrus
    Replies:
    1
    Views:
    944
    Joerg Jooss
    Mar 5, 2005
  3. George Durzi
    Replies:
    3
    Views:
    4,785
    George Durzi
    Apr 28, 2005
  4. Nym Pseudo

    META NAME and META HTTP-EQUIV

    Nym Pseudo, Sep 26, 2003, in forum: HTML
    Replies:
    1
    Views:
    573
    =?iso-8859-1?Q?brucie?=
    Sep 26, 2003
  5. CronJob
    Replies:
    5
    Views:
    164
    Eric Pozharski
    Mar 20, 2009
Loading...

Share This Page