Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dan3460's avatar

Wrong Character display

I made a small web site for my local chess club and when displaying the results of the last round i'm getting an unknown character instead of the 1/2 symbol. The files that i display come directly from the USCF (US chess federation) and i store them as a blob on a mysql database. BTW the site is https://www.woodburychessclub.com the table can be seen at https://www.woodburychessclub.com/currentTournament

so far this is what i have done:

  • Changed the meta tag to charset="ISO-8859-1"
  • Changed the default_charset = "ISO-8859-1" in the php.ini file

If i look at the data using mysql workbench i see the 1/2 symbol, so its been lost either by Nginx or PHP. I'm guessing here, what do i know.

I think UTF-8 charset should be able to display 1/2 symbol, which i think is the default everywhere.

Thanks for the help.

0 likes
4 replies
Snapey's avatar

What character is in the database?

dan3460's avatar

I'm not sure. If i open the original file in VSC and the encoding is UTF-8 i get this:

<TR><TD></TD><TD>25</TD><TD>1 </TD><TD>Alexander Sykes  (752)</TD><TD></TD><TD></TD><TD>BYE</TD></TR>
<TR><TD></TD><TD>21</TD><TD>� </TD><TD>John Cornwell  (1271)</TD><TD></TD><TD></TD><TD>BYE</TD></TR>

if i change the encoding to ISO-8859-1 i get this:

<TR><TD></TD><TD>25</TD><TD>1 </TD><TD>Alexander Sykes  (752)</TD><TD></TD><TD></TD><TD>BYE</TD></TR>
<TR><TD></TD><TD>21</TD><TD>½ </TD><TD>John Cornwell  (1271)</TD><TD></TD><TD></TD><TD>BYE</TD></TR>

I think is Nginx or PHP that is applying UTF-8 to display.

Please or to participate in this conversation.