sunpeng <blueva...@gmail.com> wrote: > load data to postgresql in cmd(encoding is GBK) is WIN8:
> psql -h localhost -d test -U postgres < dbdata.sql > > I got the error: > ERROR: invalid byte sequence for encoding "UTF8": 0xff If the encoding is GBK then you will get errors (or incorrect characters) if it is read as UTF8. Try setting the environment variable PGCLIENTENCODING. http://www.postgresql.org/docs/9.1/static/app-psql.html -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general