• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Accented Characters Displayed Wrongly

 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ranchers,
Hope everyone is doing good.

I am facing problem with the following code, which is converting the accented n(ñ) to accented y(ý),automatically



is returning '385_En_DVD IM Espaýol.doc' instead of '385_En_DVD IM Español.doc' which is the file present.
i have tried to add

into the beginning of code,but this returns a rectangle box (unprintable character) against the character ñ.

Please advice,
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem occurs even with less code.


But the problem is probably in your console. Because on my Win 7 cmd.exe it outputs '385_En_DVD IM Espa±ol.doc' but in netbeans it outputs '385_En_DVD IM Español.doc'.
 
anand phulwani
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Wouter,

I am executing this code as a JSP page.So i do not have a console over here.

I think it has to do something with the charset, but i don't know what it is.

More help is really appreciated.

 
Sheriff
Posts: 22815
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spanish falls into the ISO-8859-1 charset. The well-known ISO-8859-15 is an extension to that.
 
anand phulwani
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Rob,

I think this is the default charset which was being used so when i inserted the following code the accented n(ñ) changes to accented y(ý).


but this code runs perfectly fine in the above iso-8859-1 charset


and when i used the following code

the accented n(ñ) changes to ?.

Really in a bizarre situation.
 
anand phulwani
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ranchers,

I have realized the problem is same with the following characters too.
"á", "é", "í".

All of these characters are changing to accented y(ý).

Dont know how to proceed further.
Require help.
 
Rob Spoor
Sheriff
Posts: 22815
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's definitely an encoding issue, but as specifying the charset does not work I'm not able to help you out.

Maybe someone in our JSP forum can help you; I'm moving this thread there.
 
anand phulwani
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear ranchers,

Tried setting the file.encoding to

and


but still the problem is not solved.
 
Why should I lose weight? They make bigger overalls. And they sure don't make overalls for tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic