• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Encoding issue with Chinese and Japanese characters but not for Korean

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

Thanks,
Priya
reply
    Bookmark Topic Watch Topic
  • New Topic