File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Problem in converting ANSI to UTF-8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Problem in converting ANSI to UTF-8" Watch "Problem in converting ANSI to UTF-8" New topic
Author

Problem in converting ANSI to UTF-8

Jitesh Sinha
Ranch Hand

Joined: Jun 19, 2004
Posts: 144
I am developing both client and service side of a Rest Web Service.
Client side is a web application that is using Jersey client api to call the service that is written using Spring's support of Rest.
Client is trying to send a file that is written using Window's notepad and saved by selecting ANSI from encoding list box that appears at the time of saving a notepad.
on Service side,I have a command class that has a field of byte[].

This is the code on server side -


My web.xml on service side has the filter set as follows -

When I check input.txt,one of the characters that belongs to extended ASCII character sets ’ (ASCII value 146) becomes garbled (? or blank square) .

In case it is needed,my client side code is as follows -



Same file when saved in Notepad using UTF-8 encoding,works absolutely fine without any complaints at all.
Can someone please help?

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18110
    
    8

Edited: Sorry, I misread your code. I don't have anything useful to say about that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in converting ANSI to UTF-8
 
Similar Threads
Internationlization problem
How do I get request parameters when the form is encoded?
Locale problem in struts 1.1
For all who have problems with encoding!!!
Tomcat file upload, UTF-8 and Linux