OpenVZ Forum


Home » General » Support » java urlencode problem
java urlencode problem [message #8670] Fri, 01 December 2006 07:32 Go to previous message
arnargestsson is currently offline  arnargestsson
Messages: 3
Registered: November 2006
Junior Member
Hi,

I've recently made use of Openvz in our environment. My experience is that it works very well. Our servers are mainly Apache/Tomcat webservers and I use Centos-default template. However, I've stumbled across one thing that I've not been able to solve its that
url-encode-ing behaves differently on the VE than on the host it selv. That is to say when I urlencode for example "árar" I get from the VE

%3Frar
%3Frar

but on the host I get

%E1rar
%E1rar

which what I expected. I've made a small test rutine in java to test it, I pasted it in here below.

I wonder if any of you have come across this? All help would be greatly appreciated.

TIA

Arnar
-------------------------- Code snip ------------------
import java.net.*;
import java.io.*;

public class urlenctest {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String enc="";
try{
if( args.length > 1 ){
enc = args[1];
}
System.out.println(URLEncoder.encode(args[0]));
System.out.println(URLEncoder.encode(args[0], enc));
}catch( UnsupportedEncodingException ue ){
ue.printStackTrace();
}
}

}
 
Read Message
Read Message
Read Message
Read Message
Read Message icon6.gif
Previous Topic: *SOLVED* not /etc/init.d/vz in debain package
Next Topic: Reboot
Goto Forum:
  


Current Time: Sun Sep 15 17:22:54 GMT 2024

Total time taken to generate the page: 0.03490 seconds