From 0588c6b2788c755c622ca4cf52264287d21f2992 Mon Sep 17 00:00:00 2001 From: idfx Date: Sun, 21 Apr 2002 14:18:29 +0000 Subject: [PATCH] single quote qeustionmark bug --- source/mir/misc/StringUtil.java | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/source/mir/misc/StringUtil.java b/source/mir/misc/StringUtil.java index 09f2a317..1802ed8f 100755 --- a/source/mir/misc/StringUtil.java +++ b/source/mir/misc/StringUtil.java @@ -86,7 +86,7 @@ public final class StringUtil { webdbDate.append(pad2(theDate.get(Calendar.MINUTE))); webdbDate.append(":"); webdbDate.append(pad2(theDate.get(Calendar.SECOND))); - //assumes you are an hour-multiple away from UTC.... + //assumes you are an hour-multiple away from UTC.... int offset=(theDate.get(Calendar.ZONE_OFFSET)/(60*60*1000)); if (offset < 0){ webdbDate.append("-"); @@ -183,7 +183,7 @@ public final class StringUtil { returnDate.append("Z"); } else{ - //need to see what a newfoundland postgres + //need to see what a newfoundland postgres //timestamp looks like before making this robust returnDate.append(tzInfo); returnDate.append(":00"); @@ -246,7 +246,7 @@ public final class StringUtil { } /** - * Splits the provided CSV text into a list. stolen wholesale from + * Splits the provided CSV text into a list. stolen wholesale from * from Jakarta Turbine StrinUtils.java -mh * * @param text The CSV list of values to split apart. @@ -310,7 +310,20 @@ public final class StringUtil { */ public static String quote(String s) { - String s2 = quote(s, '\''); + //String s2 = quote(s, '\''); + //Quickhack ÊÊ Ê Ê Ê Ê Ê Ê + //Because of '?-Bug in Postgresql-JDBC-Driver + StringBuffer temp = new StringBuffer(); + for(int i=0;i