This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in converting ANSI to UTF-8

 
Jitesh Sinha
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20966
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edited: Sorry, I misread your code. I don't have anything useful to say about that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic