Forum OpenACS Q&A: Re: pg_restore with blobs problem

Collapse
Posted by Don Baccus on
uuencoding is a text encoding of binary data that's safe to send via e-mail etc.  You can't just put binary data into a text string and get it back out in PostgreSQL because a byte value of zero is used to flag the end of a string.  So any string of binary bytes that contain a zero would be corrupted (prematurely terminated, actually) when read back out of the database.

uuencoded binary data, on the other hand, only contains printable characters that don't cause such problems.  The penalty is modest, it takes 4 uuencoded bytes to store 3 arbitrary 8-bit bytes.