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 field on my website in a form, it shows up as the question-mark in firefox.
Heres the html/php:
$sql = mysql_query("select * from `settings`");
while ($row = mysql_fetch_assoc($sql))
$setting[$row['field']] = htmlspecialchars($row['value'], ENT_QUOTES);
<input type="text" name="currency_symbol" id="currency_symbol" size="50" value="<?php echo $setting['currency_symbol']; ?>" />
I am using the following meta tag on the page:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
I've tried using utf8_general_ci for the field, but I get the same result.
Hold down Alt and type 0128 to get a Euro key to appear.
To type the Euro symbol (€) in Microsoft Word for Windows, press CRTL + ALT + E.
#1 – Using Shortcut Key We can use a shortcut key to insert the “EURO” symbol in the cell of MS Excel. The shortcut key is “Alt+0128.” We need to press the keys for “0”, “1”, “2,” and “8” while pressing the “Alt” key to enter the “EURO” symbol in the cell.
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, €.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With