I've having trouble with accented characters now if i do utf8_decode() before echoing the title the problem is solved but instead of changing this all over my theme, can't I do this in one place that upgrade proof? I'm not really familiar with hooks but I think thats they way to do it, havent found out how to do it tho.
-
3You should rather find out why UTF-8 does not work. That is the default encoding, and it should not be changed.– fuxia ♦Commented Dec 11, 2012 at 9:02
-
Yea true but think is info comes from feed and the accented chars are not correctly in there its there uncoded, which means it gets loaded in uncoded so either I change the importer to decode before storing or i change the enchoing, decoding probly better. Which I just did– BramCommented Dec 12, 2012 at 1:07
Add a comment
|
1 Answer
The filter for the_title
functions is this one:
add_filter( 'the_title', 'f711_title_filter' );
function f711_title_filter( $title ) {
return utf8_decode( $title );
}