in reply to UTF8 and Postgresql

Not knowing the column spec of the table you are trying to import the data into, nor Postgres very well, nor even the purpose to which end you are storing spam, this is a complete shoot into the dark - but you might want to import that spam data full of nasty unicode into a blob (binary large object) field.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}