• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problems while reading locale specific characters in Java

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We are facing problems in reading locale specific characters from a file.
We are using the Buffered Reader to read the file, but the locale specific chars in the file are read as some wrong characters.

for Example the char: é is read as ý by the Buffered Reader. We are using the Jdk1.3.

Could you please help me in resolving this problem.

Many Thanks,

CHandra
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using the same character encoding to read the file as it was written in?
 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes.. we are writing to the file using a buffered Writer and reading using a bufered reader.
and to my surprise i found a strange thing here...
When i run my program in Windows OS it's reading the characters correctly.
But when i run my program in UNIX OS the locale specific characters are read differently.
 
reply
    Bookmark Topic Watch Topic
  • New Topic