Home > Archive > PostgreSQL Administration > January 2006 > java.net.URLEncoder.encode









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author java.net.URLEncoder.encode
tony

2006-01-12, 9:24 am

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(nextIte
m));
}
}
}

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


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com