0

我在 Windows 7 机器上有一个 PostgreSQL。这里是我的数据库脚本:

CREATE DATABASE usersdb
   WITH OWNER = postgres
   ENCODING = 'UTF8'
   TABLESPACE = pg_default
   LC_COLLATE = 'Russian_Russia.1251'
   LC_CTYPE = 'Russian_Russia.1251'
   CONNECTION LIMIT = -1;

我的问题是我在 Jetty/Tomcat 中看到不可读的错误:

Caused by: org.postgresql.util.PSQLException: ?????: ???????????? "test_user" ?? ?????? ???????? ??????????? (?? ??????)

我尝试在 pgAdmin 中创建新数据库,但我只能选择 LC_COLLATE = 'Russian_Russia.1251' 和 LC_CTYPE = 'Russian_Russia.1251' 。
我怎么解决这个问题?

4

1 回答 1

0

The first place to look, of course, are in the PostgreSQL logs. Those may be better handled than your Jetty/Tomcat instance.

The second question is what client encoding is set. You may want to (via jdbc):

show client_encoding;

Finally lc_messages may need to be adjusted.

于 2013-11-12T01:57:24.803 回答