• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

problem in getting Japanese Characters from HttpServletRequest

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings to all,

I am trying to get the Japanese characters from HttpServletRequest. But I get it as question marks. The following is the code snippet that I use:




In the above code When I display the encoding of the incoming httpServletRequest it is showing as null. So I have set it to UTF-8 encoding.

But when I write it a file, i am getting japanese characters as ???.

ANy help appreciated.

Thanks in advance
Priby
 
priby mathew
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the above code, the for loop statement is as follows:



Thanks
priby
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Recently there was a similar discussion here.
See if this solves your problem.


Hope this helps
 
priby mathew
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Amit for your reply

I checked the page that you suggested but they say to set the required encoding as

ServletRequest.setCharacterEncoding(String enc)

which I had already done in my code.

Moreover I am not fetching the Japanese data from a JSP page. Another application is sending the Japanese data to my application.

Thanks
priby
 
Amit Ghorpade
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Another application is sending the Japanese data to my application.


Then if you have done the encoding stuff, you need to make sure that the another application has also done it in proper way.

Hope this helps
 
reply
    Bookmark Topic Watch Topic
  • New Topic