[Petal] More on entities and Â

Grant McLean grant at mclean.net.nz
Mon May 3 20:09:05 BST 2004


William,

If your output encoding is UTF8 then every character beyond
0x7F will be two or more bytes.  The non-breaking space
character should be A2 A0 (I think).  So as long as you give
the browser the correct charset setting in your headers, it
should do exactly the right thing.

Regards
Grant

William McKee wrote:
> Hi all,
> 
> Well, the saga continues for me and the capital A circumflex. Most
> recently, I am receiving the \302 character on a production server but
> not on my test server. Both servers are running Debian Linux with Apache
> 1.3.29 and mod_perl 1.29.
> 
> In this case, I'm not using Petal::HTB which I thought was the culprit
> in my previous posts. This time, with the help of Firefox, I was able to
> determine that Petal is outputting a nbsp character (\240) but is
> prepending it with a \302 character (the capital A circumflex, A0 in
> hex). On my test server, the \302 character is not being output.
> 
> Chris had indicated this appending behavior with his posts regarding the
> copyright character and the capital A circumflex. At the time, I did not
> realize that the same behavior was occurring with the nbsp entity. So it
> appears to be affecting more than just the nbsp entity.
> 
> None of the previous recommendations such as changing the file encoding
> or setting the meta tags are helping. For now, I'm going to do a global
> search and replace on the output of the process command to remove this
> character. However, this is not a good long-term solution due to the
> hackish nature and the performance hit. Any suggestions or advice for
> tracking down this bug would be most appreciated.
> 
> Regards,
> William
> 




More information about the Petal mailing list