One of my fields (which is a latin1_swedish_ci) seems to show the euro symbol fine in PHPMYADMIN inside of the field.
However, when I try to echo it in an input fie
Try to change the MySQL charset to UTF-8 or to Swedish.
Here it is a small example.
If you are serving the page as UTF-8, you will need to ensure you grab the string out of the database in the UTF-8 encoding before putting it on the page. You can do that using:
mysql_set_charset('utf8');
(If you're doing that it would also make sense to store your actual table data in UTF-8 too, eg utf8_general_ci
, rather than latin1_swedish_ci
, so you can deal properly with characters outside of the basic Latin-1 set.)
Try using htmlentities() instead of htmlspecialchars()
.
Special chars does not convert everything, just a few select characters. The Euro symbol €, needs to be encoded really, €
.