Our client's site uses: ISO-8859-1 - on its primary site UTF-8 on its "/blog/" directory for it's Wordpress blog, utilizing a template that utilizes UTF-8 encoding.

This really is fine, but on our primary site, we make use of the Wordpress API functions for example get_the_excerpt() to obtain the latest news in the blog, and display it on the house page. However , some MS-Word figures appear to become special figures which display fine around the blog, but display such as this on the house page:

Key Brand – test

I attempted altering my meta character encoding to UTF-8, however it did not help. Rather, this PHP code works:

htmlentities($except_text, 1, "UTF-8", )

Despite the fact that I scribe it from UTF-8, it really works fine on my small ISO-8859-1 template. I am much less experienced around the character-encoding aspect, and I'll proceed using the above fix, but Among the finest to understand if anybody can explain why the above mentioned works and why altering my character encoding did not work? The smoothness is valid (e.g. the - hyphen in Word and also the 'quotes' produced in Word).

[UPDATE] Really, it does not work fine. The above mentioned also goes ahead and converts my "find out moreInch connect to a readable < a href > tag - i.e. the HTML is really converted :( Any ideas the way i can deal with this?

Thanks, Rishi

htmlentities will convert non-ASCII figures to HTML organizations - &rsquo; etc., that will then be construed properly no matter if the client is expecting latin1 or utf8.

mb_convert_encoding($excerpt_text, "ISO-8859-1", "UTF-8") is most likely what you ought to perform the conversion. When the Wordpress blog consists of non-latin1 figures, you are SOL obviously.