Hi everyone,
The degree symbol for temperatures appears incorrectly encoded in the output of some pages. What comes in the HTML is the ASCII character itself (176 in decimal, 0xB0 in hex). It is neither HTML-encoded as °
nor does it come as a two-byte UTF-8 sequence (as expected because the server’s response header says the page is encoded in UTF-8). Here’s what I see (near the top-left corner of the page at High Park Village Weather Station - Home):
I have tried a workaround by attempting to remove the degree symbol from the output but all the settings I have found do not actually have the degree symbol as part of the template so it should not be there. This is what I checked:
- in
testtags.php
(available [here], High Park Village Weather Station - testtags) the incorrectly encoded degree symbol can also be seen in the line starting with$temperature
. In the same file, the unit of measure is without the degree symbol, as seen in the line$uomtemp = 'C';
- in the script that produces that particular section of the page,
ajax-dashboard-2022.php
, the unit of measure is set with a correctly-encoded symbol:$uomTemp = ' °C';
- in
Settings.php
, the unit of measure for temperatures is set as a site variable without the degree symbol as well in the line$SITE['uomTemp'] = ' C';
I’m quite baffled where the degree symbol comes from. Any ideas?
Thanks,
Marian