Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Malformed UTF-8 character error after fetching data from Postgresql

by nihiliath (Initiate)
on Jul 18, 2014 at 08:04 UTC ( [id://1094171]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Malformed UTF-8 character error after fetching data from Postgresql
in thread Malformed UTF-8 character error after fetching data from Postgresql

10x. That seems to be the problem. When I connect to my database the client encoding is UTF8, and by default DBD::Pg set the internal Perl UTF8 flag to true. This cause problems when I change the client encoding after connecting. Perl is asuming that my fetched data should be stored as UTF8 and this is not working. When I set pg_enable_utf8 to 0 everything is fine. Better solution is to set the pg_enable_utf8 flag to -1 after changing the client_encoding as suggested in the DBD::Pg documentation.
  • Comment on Re^3: Malformed UTF-8 character error after fetching data from Postgresql

Log In?
Username:
Password:

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

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

    No recent polls found