• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Encoding issue with Chinese and Japanese characters but not for Korean

priya Anand
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am dealing with the problem below and have tried a lot of options to correct this. Could anyone help me resolve the issue?

Some japanese text is returned to my jsp from SAP, the text looks like ‚P‚T“ú’÷“–ŒŽ––Œ»‹à .

When I manually set the encoding of my browser to Shift-JIS, the problem is resolved and the text is seen as 15日締当月末現金

However, I set my response.setContentType as Shift-JIS, the browser automatically selects the encoding as Shift-JIS, but my characters get displayed as ???

I had a similar problem with Korean characters, and I used,
decodedString = new String(strToBeDecoded.getBytes("iso-8859-1"),"EUC-KR");

It worked and I did not have to use the setContentType method of servlet response. This code however does not work for either Japanese or Chinese characters.

Please let me know, if there is anyway of getting the characters right on the screen.

I am using Sun Java Application Server 8.1.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic