|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: Perl and Postgresql: Invalid byte sequence for encoding "UTF8"by ides (Deacon) |
| on Dec 22, 2006 at 09:47 UTC ( [id://591337]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
I ran into this recently myself with a project to insert E-mail messages into a PostgreSQL database. I solved it like so:
The capitalization of the UTF-8 in the call to encode() is important, it tells encode to be "strict" about the UTF-8. It turns out use utf8; isn't 100% strict and hence can't be inserted into a strict mode PostgreSQL database. Hope this helps.
Frank Wiles <frank@revsys.com>
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||