I’m having trouble with some data I’ve imported from an XML file. Unfortunately I’m working with some spanish characters, usually I’d just htmlentites them, but it’s not working.
Examples of what I’m trying to display:
PRCE PEDUCED FROM 1,395,000€
A delightful south facing villa located in Génova
Should be:
PRCE PEDUCED FROM 1,395,000€
A delightful south facing villa located in Génova (no idea what that should be...)
Any ideas?
Edit: Table encoding is utf8_spanish_ci, PHP is currently set to ISO-8859-1 as a ditch effort. Client side is currently UTF-8
$text = nl2br($Property->description);
$trans_text = iconv('UTF-8', 'ISO-8859-15//TRANSLIT//IGNORE', $text);
echo $trans_text;
echo htmlentities($trans_text, ENT_QUOTES, 'ISO-8859-15');
Using the table on http://www.i18nqa.com/debug/utf8-debug.html I concluded in two steps:
€ => € => €
Génova => Génova => Génova
I believe you can update the content of your database like this:
UPDATE tablename SET columnname = REPLACE(columnname, '€', '€');