invalid byte sequence for encoding “UTF8″: 0×8b - storing binary data
Posted on July 24th, 2008 by linux
This error message took me lots of effort and time to solve it. The problem is that before storing binary data strings in the postgresql database the binary strings need to be escaped before storing them. There is on the google available subroutine for per which is doing this job. It is called escape_bytea. Anyway here is a whole script on how to store and retrieve binary data with perl form PostgreSQL database.
the other solution which a have not tried yet is to encode them with
Base64 Encoder Decoder
http://perldoc.perl.org/MIME/Base64.html
Filed under: Administration, Database, Debian, Perl