File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in getting Japanese Characters from HttpServletRequest

 
priby mathew
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the above code, the for loop statement is as follows:



Thanks
priby
 
Amit Ghorpade
Bartender
Posts: 2851
10
Fedora Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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: 2851
10
Fedora Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic