From: tony <tony@tgds.net>
To: [ADMIN] <pgsql-admin@postgresql.org>
Subject: java.net.URLEncoder.encode
Date: Thu, 12 Jan 2006 15:49:27 +0100
Message-ID: <1137077367.3650.108.camel@hush.localdomain> (raw)
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
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-admin@postgresql.org
Cc: tony@tgds.net
Subject: Re: java.net.URLEncoder.encode
In-Reply-To: <1137077367.3650.108.camel@hush.localdomain>
References: <1137077367.3650.108.camel@hush.localdomain>
* 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