• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Problem in converting ANSI to UTF-8

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
Marshal
Posts: 27531
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Edited: Sorry, I misread your code. I don't have anything useful to say about that.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic