• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accented Characters Displayed Wrongly

 
anand phulwani
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • 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,
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • 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: 242
  • Mark post as helpful
  • send pies
  • 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.

 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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: 242
  • Mark post as helpful
  • send pies
  • 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: 242
  • Mark post as helpful
  • send pies
  • 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: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear ranchers,

Tried setting the file.encoding to

and


but still the problem is not solved.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!