I was really discouraged by java's string encoding. There are many auto conversions in it. and I can't found the regular. Anyone have good idea? for example: In a jsp page, it has such link
http://localhost:8080/helloworld/hello?world=凹ㄉ
And then we need to process it, so we do this:
String a = new String(request.getParameter("world").toString().getBytes("ISO-8859-1"),
"UTF-8");
a = "http://localhost/" + a;
And when I debug it, I found a is right.
And then I pass this to a session object: request.getSession().setAttribute("hello", a);
Later in a jsp page with encoding "Big5", and i try to get the attribute and display, And i found the characters "凹ㄉ" are corrupted.
How can I solve this?