Re: Newly converted to 8.2.5 and getting this error

From: "Peter Koczan" <pjkoczan(at)gmail(dot)com>
To: "Mark Steben" <msteben(at)autorevenue(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Newly converted to 8.2.5 and getting this error
Date: 2008-03-10 18:58:17
Message-ID: 4544e0330803101158j2010f360qd487defd60bd9d9a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Mar 10, 2008 at 9:41 AM, Mark Steben <msteben(at)autorevenue(dot)com> wrote:
> We have an application that cuts and pastes from Word and is getting this
> error now that we have converted to 8.2.5.
>
> The characters that are erroring are imbedded in the document. We would
> prefer not having to remove them
>
> ...
>
> Our client_encoding is obviously set at UTF8. Is there a client_encoding
> value that is less restrictive?

http://www.postgresql.org/docs/8.2/static/multibyte.html

SQL_ASCII is less restrictive in that it will do no character
conversion or checking. It comes with many caveats (read the above
page). I think it also matters what the database on the server side is
expecting. I don't think you can insert invalid Unicode into a UTF8
database, even if your client encoding is SQL_ASCII. It might try its
best to convert the data, but don't quote me on that.

If you really want to insert everything and don't care if it's valid
UTF8 or not, create the database with the SQL_ASCII encoding. If you'd
like there to be some semblance of checking, you'll have to think of
some other solution.

Peter

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Grzegorz Dostatni 2008-03-10 22:23:06 WAL Archiving, warm standby - edge cases questions:
Previous Message frant101 2008-03-10 15:49:30 Reindex + relation doesnt exist