Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Encoding - UTF-8 cannot display Extended ASCII Character ?

 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 web application and found one funny case which is in Admin the character display fine but it displays blank/question_mark for the character in User Web.

1 - Admin
2 - User Web

In Admin application, in web.xml encoding is iso-8859-1. and all the JSPs i put this tag:



In UserWeb app, in web.xml encoding is utf-8 and all the JSPs i put this tag:



So the case is, I have this character in DB --> ' (which is chr(146) - extended ascii character)
In admin it retrieve from DB and display the character correctly as in --> '
but it doesn't display correctly in UserWeb.

DB character set is US7ASCII

--------------------
Is above encoding part is the cause of the issue ?
If so, why UTF-8 character encoding cannot somehow accept extended ascii character like chr(146) ?

Anyone got idea ?
I've been stuck for the whole day ...


 
Stephan van Hulst
Bartender
Pie
Posts: 6083
71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using the same fonts in both applications to display the character?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic