java.net.URLEncoder.encode

From: tony <tony(at)tgds(dot)net>
To: "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: java.net.URLEncoder.encode
Date: 2006-01-12 14:49:27
Message-ID: 1137077367.3650.108.camel@hush.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi

Since migrating my application to up to date versions I have run into a
new accent related problem. java.net.URLEncoder.encode is nuking French
accents in URL strings. I am using an sqlEncode script for escaping
accents in JDBC queries to the database. It works just fine but moving
through record sets does not - the query variable that is passed to the
next page is no longer escaped... The offending Dreamweaver MX code is
as follows:

// add the Form variables to the MM_keepForm string
if (request.getParameterNames().hasMoreElements()) {
java.util.Enumeration items = request.getParameterNames();
while (items.hasMoreElements()) {
String nextItem = (String)items.nextElement();
boolean found = false;
for (int i=0; !found && i < MM_removeList.length; i++) {
if (MM_removeList[i].equals(nextItem)) found = true;
}
if (!found && MM_keepURL.indexOf('&' + nextItem + '=') == -1) {
MM_keepForm = MM_keepForm + '&' + nextItem + '=' +
java.net.URLEncoder.encode(request.getParameter(nextItem));
}
}
}

If I convert my database to UTF-8 will this problem go away? It is
currently still LATIN1

Cheers

Tony
--
Tony Grant
www.tgds.net - vente d'ordinateurs mini-itx, hébergement: www.3continents.com - international film festival |
www.chez-reine.com - gîte en Bretagne | www.haut-planty.com - Muscadet wine | www.loire-estuaire.org - GIP Loire Estuaire

Browse pgsql-admin by date

  From Date Subject
Next Message Kai Hessing 2006-01-12 14:55:40 Problem with restoring database from 7.3.1 to 8.0.1
Previous Message Josh O'Brien 2006-01-12 14:15:08 upgrade help