Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Unicode Woes

by BigLug (Chaplain)
on Oct 01, 2004 at 09:10 UTC ( [id://395574]=note: print w/replies, xml ) Need Help??


in reply to Re: Unicode Woes
in thread Unicode Woes

I've tried that ... I get the data from LWP, then send it through DBI to Postgres. However it ends up as a string of � characters. More importantly, when I send the recieved string out to the browser (with the header as you say) I similarly get nothing appearing.

Cheers!
Rick
If this is a root node: Before responding, please ensure your clue bit is set.
If this is a reply: This is a discussion group, not a helpdesk ... If the discussion happens to answer a question you've asked, that's incidental.

Replies are listed 'Best First'.
Re^3: Unicode Woes
by gaal (Parson) on Oct 01, 2004 at 09:19 UTC
    There are many links in this chain, and if things don't work as a whole you have to go over them link by link to see where the problem(s) happen.

    View Unicode in hex offers a nice way of seeing what your actual data is. Adapt the code there to print what you get from LWP. Then make sure what gets fetched from the database is still UTF-8. Finally don't trust your browser, download the page that the web server handed you and see what information is actually there. (It might be your server is sending *two* Content-type headers, in which case only one of them (the wrong one, by Murphy's law) is honored by your browser.

    Oh, you also need to tell DBD::Pg that your data needs to be treated as UTF-8. Check out the pg_enable_utf8 attribute. (If you move to mysql one day, contact me for a patch giving similar functionality.)

    I suggested many things above but I recommend you tackle them one at a time, not all at once. That way if the first link in the chain was the only bad one you don't waste your time with the others.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://395574]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found