tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Crowther <Peter.Crowt...@melandra.com>
Subject RE: Unable to display UK Pound Sign
Date Mon, 12 May 2008 14:33:56 GMT
> From: Stephen Nelson-Smith [mailto:sanelson@gmail.com]
> I've just upgraded from 4.1.37 to 6.0.16.  My app works, but where my
> code usually displays a British Pound sign, I get an odd char - a ? in
> a diamond on Linux, an empty box on Windows.
>
> Here's the html that the app produces, shown in hexl-mode in emacs:
>
> 00005860: 223e 4361 7368 2050 7269 6365 20a3 0a3c  ">Cash Price ..<
>
> a3 is correct for £, 0a is a return char, I believe?
>
> Nothing else has changed on the machine.  I did the same upgrade on a
> different machine and got exactly the same behaviour.
>
> Any pointers?

What encoding are you using?  This feels like an encoding mismatch, probably caused by moving
from ISO8859-1 to UTF-8.  In 8859-1, the single byte 0xa3 is, indeed, a pound sign.  In Unicode,
when encoded as UTF-8, the sequence is 0xc2 0xa3.

You can go hunting for all the places in which the encoding could be specified, or you can
tell the developers to use the HTML entitiy "&pound;" instead of a direct reference, which
bypasses the problem by keeping all the characters encoded the same way whether ISO8859-1
or UTF-8 is used.

                - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message