OK, I’ve been having some trouble getting unicode to display with WordPress, I tried upgrading, but nothing seemed to work. Finally I managed to get it working by editing wp-includes/wp-db.php and commenting out the lines setting the $collation_query to “SET NAMES utf8”. For some reason, this now seems to have things working and I can (at last) finish off my first real post on the blog (coming soon)!
Just for good measure, here’s a little unicode Hebrew: בראשית ברא אלהים את השמים ואת הארץ.
And here is a quick comment to determine whether Hebrew is working in the comments as well!
בראשית ברא אלהים את השמים ואת הארץ
With newer versions of WordPress the code here has changed and my “hack” to fix the problem is to comment out the two lines in the wp-db.php file in the __construct function which are:
if ( defined(‘DB_CHARSET’) )
$this->charset = DB_CHARSET;
Hello, Mr. Shields!
Thanks for the advice you left on my recent post lamenting my problems with getting wordpress to show Greek characters. Forgive my technical ignorance, but where do I find this wp-dp.php file? If I can just find it, I should have no problem implementing the edit you suggested, but I’m not seeing it.
Thanks again and a happy New Year,
Mitchell.
Nevermind. I worked it out. Thanks for the help!
Mitchell, no worries. I’ve just worked out another way to achieve the same end: edit the wp-config.php file and change the line:
define('DB_CHARSET', 'utf8');
to:
define('DB_CHARSET', '');
This has the same effect.
I note you’ve got a problem with non-breaking spaces now not displaying correctly. I don’t double-space text myself (not in line with most modern typesetting guidelines), but I’ll see if I can reproduce and fix the problem.
As to double-spacing, I realize I shouldn’t, but it was drilled into my head by an elderly but incredibly effective and strict typing teacher. It is only thanks to her that I can type effectively at all, rather than hunting and pecking. I’ve found a rather simple way to fix the non-breaking spaces (using find-replace in OpenOffice, one post at a time), so there’s no need to trouble yourself unless you find it interesting for its own sake. Again, thanks for the help.