Skip site navigation (1) Skip section navigation (2)

[JDBC] string conversion patch

From: wrobell <wrobell(at)posexperts(dot)com(dot)pl>
To: pgsql-patches(at)postgresql(dot)org
Subject: [JDBC] string conversion patch
Date: 2000-11-17 18:01:34
Message-ID: 20001117190134.J1963@pred.posexperts.com.pl (view raw or flat)
Thread:
Lists: pgsql-patches
This patch should be applied against current pgsql cvs tree
in src/interfaces directory. Current jdbc version saves
strings in client encoding, i.e. when software runs
on Windows then strings are saved in CP1250 not in Latin2
as it should be (when database encoding is Latin2).

The patch fixes the problem - strings are stored in database encoding.

  wrobell <wrobell(at)posexperts(dot)com(dot)pl>


-------- cut here ------------
diff -Nur jdbc.old/org/postgresql/Connection.java jdbc/org/postgresql/Connection.java
--- jdbc.old/org/postgresql/Connection.java	Thu Nov 16 18:25:52 2000
+++ jdbc/org/postgresql/Connection.java	Fri Nov 17 18:26:01 2000
@@ -363,8 +363,7 @@
 	    try
 		{
 		    pg_stream.SendChar('Q');
-		    buf = sql.getBytes();
-		    pg_stream.Send(sql.getBytes());
+		    pg_stream.Send(buf);
 		    pg_stream.SendChar(0);
 		    pg_stream.flush();
 		} catch (IOException e) {
-------- cut here ------------

pgsql-patches by date

Next:From: webmasterDate: 2000-11-18 07:32:33
Subject: New Search Engine Requires Your Input.
Previous:From: Tatsuo IshiiDate: 2000-11-17 02:29:02
Subject: Re: Re: [PATCHES] A Patch for MIC to EUC_TW code converting in mbsupport

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group