Reputation: 1
I have a problem with the encoding when someone shares something from my blog. (fantasyelf.com/blog) The entire site contains Cyrillic symbols and the posts too. For example when I like the post on my profile in Facebook, the title is correct, but in the description there is only ÐобÑе доÑли!. I tried to convert all of my .php's to UTF-8 without BOM, but then I had problems with opening posts. So I changed the content.php file back to normal. The problem still exists.
Upvotes: 0
Views: 1211
Reputation: 4754
I had a similar problem, where my wordpress blog was rendering all UTF-8 content correctly, but certain (not all) articles with non-ASCII characters were messed up in Facebook.
The culprit was auto-truncation of the meta description header in Wordpress. The meta description header was truncated not at a character boundary, but at a byte boundary, hence displaying invalid characters (as question marks) in the page source. That must've disturbed the Facebook Open Graph scraper.
I ended up with the quick fix of adjusting the content of those blogposts manually, so that the truncation would not happen upon a non-ASCII (multibyte) character.
Upvotes: 1
Reputation: 1
Try using recode from GNU/Linux, i solved the problem recoding to UTF-8 the header.php file of my wordpress theme. You can see also the locales configuration and view the encode of the file using file -i myfile.php under GNU/Linux too.
Read about the opengraph protocol too: http://ogp.me/
Upvotes: 0