From: | Prasanth Reddy <dbadmin(at)nqadmin(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org, Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com> |
Subject: | Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 |
Date: | 2015-08-08 04:25:10 |
Message-ID: | 55C584A6.1040600@nqadmin.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
*
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
From | Date | Subject | |
---|---|---|---|
Next Message | dmp | 2015-08-08 05:08:41 | Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 |
Previous Message | Vladimir Sitnikov | 2015-08-07 20:09:55 | Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 |