Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VV9hW-0001sE-Pf for pgsql-jdbc@arkaria.postgresql.org; Sun, 13 Oct 2013 00:38:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VV9hW-0007Dr-5I for pgsql-jdbc@arkaria.postgresql.org; Sun, 13 Oct 2013 00:38:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VV9hU-0007Di-8w for pgsql-jdbc@postgresql.org; Sun, 13 Oct 2013 00:38:28 +0000 Received: from hogranch.com ([75.101.82.47]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VV9hR-0007cq-GG for pgsql-jdbc@postgresql.org; Sun, 13 Oct 2013 00:38:27 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id r9D0cJl12962 for ; Sat, 12 Oct 2013 17:38:19 -0700 Message-ID: <5259EB7D.9000004@hogranch.com> Date: Sat, 12 Oct 2013 17:38:21 -0700 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Java String saving as unicode in database References: <1381565943021-5774370.post@n5.nabble.com> <52597C74.6070104@ttc-cmc.net> <1381622110422-5774410.post@n5.nabble.com> In-Reply-To: <1381622110422-5774410.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On 10/12/2013 4:55 PM, saisantoshi wrote: > I tried this but the problem is its not saving in the DB as what I wanted to > store.. > *Sample\u0020\u0061\u0074\u0020\u0032\u0032\u0042\u0020 text > > Its converting the above and storing it in the DB. When I look at the > database, it is something that I can't understand looking at it. May be its > an editor problem. How do I view the exact string stored from my windows cmd > prompt connecting to postgres sql. Java (and microsoft windows) uses UCS16, while SQL (and unix/linux and the internet and about everything else) uses UTF8 (but only if its so configured). with SQL, you have two things, the database encoding, and the client_encoding, the latter can be changed on the fly, while the former is setup when the database is initialized and created. -- john r pierce 37N 122W somewhere on the middle of the left coast -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc