[sclug] URL encoding/decoding question

pieter claassen pieter at claassen.co.uk
Mon Feb 20 16:24:58 UTC 2006


Ok, looks like mozilla is broken in regards to this matter.

So, I thought this should work to intercept all inserts into the db and
just convert them back to something civil?

	static public String decode (String data){
		data.replace(String.valueOf('\u20AC'),"€");
		return data;
	}
However, no luck.

My question. How do I print the "data" string in the above code in UTF
format so that I can see what is being submitted to the DB?

I thought something like this should work (but it only prints weird
chars and not \u20AC or such)

		System.out.println(data.toCharArray());

Thanks,
Pieter



More information about the Sclug mailing list