Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: PostgreSQL connection set in UTF8

by jcb (Curate)
on Nov 06, 2019 at 00:58 UTC ( #11108342=note: print w/replies, xml ) Need Help??


in reply to PostgreSQL connection set in UTF8

Try binmode: binmode DB, ':utf8';

But you should probably be using Text::CSV (or DBD::CSV) and DBI for this, instead of opening a pipe to psql. What happens if a row fails to insert due to a constraint violation in your current code? DBI will report the error.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2020-04-01 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (186 votes). Check out past polls.

    Notices?