[Building Sakai] Blog Tool encoding problem

Yan-hong Lin lyhcode at gmail.com
Wed Mar 25 08:05:20 PDT 2009


Hello,

I'm trying the Blog tool.
It works well with type english title/messages.
But has problems when input characters like "新標題"("New Title" in Chinese).
The jsp program received wrong encoding parameters using
request.getParameter().
I try with code below...

out.println(request.getParameter("PostForm:idTitle"));

Result is wrong encoded text output.
And code below has correct output.

out.println(new
String(request.getParameter("PostForm:idTitle").getBytes("ISO-8859-1"),
"UTF-8"));

There are no effects if add request.setCharacterEncoding("UTF-8") or
request.setCharacterEncoding("ISO-8859-1") before test code.
So I think the problem is Blog Tool are not full UTF-8 support.
Does anyone have suggestions for resolve this problem?
I want to fix by modify source code, and publish the solution.
Thanks.

    lyhcode
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090325/ae58489f/attachment.html 


More information about the sakai-dev mailing list