Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dash becomes question mark

843838Jan 31 2007 — edited Feb 16 2007
Hi, I have the following Portugese text in my database: S�TIO V�RZEA DO PARAITINGA � AREIAS-SP

When I display it on my jsp page the dash becomes a question mark and the String shows like this: S�TIO V�RZEA DO PARAITINGA ? AREIAS-SP

When i log the String it looks fine but when I display it using
<%=request.getAttribute("subject")%>
the question mark is there instead of the dash. If I execute the following code in the servlet the problem is resolved:
subject=subject.replaceAll("�","& ndash;"); 
With & ndash I mean the html for dash which can not be written here without it getting converted to &ndash;. Executing the replacement should not be necessary however.

What am I doing wrong?

Niklas

Message was edited by:
Niklas

Message was edited by:
Niklas
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2007
Added on Jan 31 2007
3 comments
1,090 views