Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: PostgreSQL connection set in UTF8

by jcb (Vicar)
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 meditating upon the Monastery: (5)
As of 2021-01-15 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?