Re: PGCLIENTENCODING behavior of current CVS source - Mailing list pgsql-general

From Tom Lane
Subject Re: PGCLIENTENCODING behavior of current CVS source
Date
Msg-id 18777.1100617917@sss.pgh.pa.us
Whole thread Raw
In response to PGCLIENTENCODING behavior of current CVS source  (Weiping <laser@qmail.zhengmai.net.cn>)
Responses Re: PGCLIENTENCODING behavior of current CVS source
Re: PGCLIENTENCODING behavior of current CVS source
List pgsql-general
Weiping <laser@qmail.zhengmai.net.cn> writes:
> [ database encoding is unicode ]
> now I can login, but when I do a:

> DHY_JJG=# \dt
> ERROR: invalid byte sequence for encoding "UNICODE": 0xed

> but, after:

> DHY_JJG=# \encoding gbk
> DHY_JJG=#\dt

> woule be ok.

This is a risk no matter what encoding is used in the client-side .po
files; as long as it's different from the current client_encoding,
there is a potential for mis-conversion and other problems.  I don't
see a simple solution.  In this particular case, it would help if psql's
describe commands didn't assume they could send localized column headers
to the server --- but I don't think that solves all related issues.

BTW, Peter, it seems like this may be a good argument for keeping the
client and server .po files separate.  They might need different encodings.

            regards, tom lane

pgsql-general by date:

Previous
From: "Mike Cox"
Date:
Subject: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Next
From: Mage
Date:
Subject: out of disk space