Saturday, March 19, 2011

Japanese character reading & sending

While I developed to save Japanese characters, I didn't pay attend to UTF-8 since I was able to see Japanese characters in datastore properly.

The issue was found when I loaded data into my android device. It was a line of code to address this issue.

I just need to set contentType..

public void doGet(HttpServletRequest request, HttpServletResponse response)

throws IOException {

response.setContentType("text/html;charset=UTF-8");

PrintWriter writer=response.getWriter();

......

}



0 comments:

Post a Comment