| Tuesday 14 June 2011 - 00:04
problema encoding news: Vedo che i files delle notizie sono codificati con UTF-8, eppure nonostante che utilizzo sempre UTF-8 come charset del sito alcune caratteri delle news non erano ben codificati. Ebbene ho fatto un po' di ricerche nel codice e ho trovato il colpevole:
Nel file "sections/00_News/functions.php", nella funzione "get_news_contents()", c'è la seguente riga:
$item['news_TITLE'] = htmlentities($item['title'], ENT_QUOTES);
Non è specificato l'encoding! Dovrebbe essere:
$item['news_TITLE'] = htmlentities($item['title'], ENT_QUOTES, "UTF-8");
Questo ha risolto tutti i miei problemi.
____________________________ "The whole of science is nothing more than a refinement of everyday thinking." (Albert Einstein)
|