Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92
От | Prasanth Reddy |
---|---|
Тема | Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 |
Дата | |
Msg-id | 55C584A6.1040600@nqadmin.com обсуждение исходный текст |
Ответ на | Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 (Prasanth Reddy <dbadmin@nqadmin.com>) |
Ответы |
Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for
encoding "UTF8": 0x92
Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 |
Список | pgsql-jdbc |
From log file:
ERROR: invalid byte sequence for encoding "UTF8": 0x92
STATEMENT: SELECT * FROM client_data WHERE status_code = 0 ORDER BY client_name, description
Code that causes it:
String sql = "SELECT * FROM client_data WHERE status_code = 0 ORDER BY client_name, description";
ResultSet rs = connection.createStatement().executeQuery(sql);
How do I set the connection property?
-------------------------------------------------------------
Can you share the query and parameters that reproduce the failure?
For instance, can you please set loglevel=2 connection property and
provide "FE=> Bind", "FE=> Describe", etc stdout messages that precede
"invalid byte sequence" error?
Vladimir
ERROR: invalid byte sequence for encoding "UTF8": 0x92
STATEMENT: SELECT * FROM client_data WHERE status_code = 0 ORDER BY client_name, description
Code that causes it:
String sql = "SELECT * FROM client_data WHERE status_code = 0 ORDER BY client_name, description";
ResultSet rs = connection.createStatement().executeQuery(sql);
How do I set the connection property?
-------------------------------------------------------------
Can you share the query and parameters that reproduce the failure?
For instance, can you please set loglevel=2 connection property and
provide "FE=> Bind", "FE=> Describe", etc stdout messages that precede
"invalid byte sequence" error?
Vladimir
On 08/07/2015 11:38 AM, Prasanth Reddy wrote:
Hi, I have recently migrated to 9.4.4 from 9.1. I did a dump and restore to migrate the database. When I try to connect using JDBC I am getting the following error, the database encoding is SQL_ASCII. Same error with postgresql-9.4-1201.jdbc4.jar & postgresql-9.1-902.jdbc4.jar. org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x92 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:305) at com.sun.rowset.JdbcRowSetImpl.execute(JdbcRowSetImpl.java:567) Command used to create the database /usr/local/pgsql/bin/createdb --encoding=SQL_ASCII --template=template0 db_server Thanks, Prasanth
В списке pgsql-jdbc по дате отправления: