pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dmp <danap@ttc-cmc.net>
To: dbadmin@nqadmin.com, PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92
Date: Fri, 07 Aug 2015 23:08:41 -0600
Message-ID: <55C58ED9.7070105@ttc-cmc.net> (raw)
In-Reply-To: <55C584A6.1040600@nqadmin.com>
References: <55C4DF1F.2060808@nqadmin.com>
	<55C584A6.1040600@nqadmin.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Prasanth Reddy wrote:
>  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?


String connectionString = "jdbc:postgresql://" + host + "/" + database + 
"?user=" + username
                          + "&password=" + password + "&loglevel=" + logLevel;

Connection dbConnection = DriverManager.getConnection(connectionString);

Sample Test
http://dandymadeproductions.com/temp/PostgreSQL_JDBC_Test.java

danap.



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (16+ messages)  latest in thread

Message-ID: <55C58ED9.7070105@ttc-cmc.net>
Permalink:  ../55C58ED9.7070105@ttc-cmc.net/
Also on:    postgresql.org/message-id/55C58ED9.7070105@ttc-cmc.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: danap@ttc-cmc.net
  Subject: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92
  In-Reply-To: <55C58ED9.7070105@ttc-cmc.net>
  References: <55C4DF1F.2060808@nqadmin.com> <55C584A6.1040600@nqadmin.com> <55C58ED9.7070105@ttc-cmc.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox