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.
In reply to Re: PostgreSQL connection set in UTF8
by jcb
in thread PostgreSQL connection set in UTF8
by LorenzoLu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |