I have a PostgreSQL database which uses an arcane text encoding, and I can't change that. Is there a way tostore text in UTF-7 transparently (for the informed client) so that the database engine doesn't complain that it cannot convert Unicode characters, but the client can still use any Unicode characters out there? I can do this conversion manually, but I hope there is a way to do it without manual conversion.
You can use
This is usually a terrible idea that leads to a horrid mix of incompatible and mismatched text encodings in a DB, with some apps inserting UTF-8, others latin-1, etc. It is an option if you need to work with an encoding that the database cannot actually understand, though.
Your alternative would be to add support for utf-7 to PostgreSQL. This might not be too difficult as all the encoding handling is pretty well abstracted.