This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Encoding - UTF-8 cannot display Extended ASCII Character ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Encoding - UTF-8 cannot display Extended ASCII Character ?" Watch "Encoding - UTF-8 cannot display Extended ASCII Character ?" New topic
Author

Encoding - UTF-8 cannot display Extended ASCII Character ?

Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
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 ...



From NickyEng
Diploma in Computer Studies
SCJP 1.4
SCWCD 1.4
Formula 1 app by Maxis (Playbook)
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 4000
    
  18

Are you using the same fonts in both applications to display the character?


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Encoding - UTF-8 cannot display Extended ASCII Character ?
 
It's not a secret anymore!