Recent Topics

1 Aug 23, 2014 00:35    

Hi, folks,

I have a conundrum. I recently upgraded my Russian Word of the Day blog from 2.4 to 5.0.8. I have a page I use as a "guest book" that receives mixed Russian and English comments. In 2.4 the mixed-language comments displayed correctly, but they no longer do. I'm having trouble tracking down the problem. Here's what I have verified:

    The character set for the 5.0.8 database is correctly identified as utf8_general_ci.
    The evo_comments table is correctly labelled with utf8_general_ci.
    The code page in the html header is correctly labelled with <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    System/Regional/Locales: I set the default locale to "English (US) utf8". No change.
    Moved "English (US) utf8" locale to the top priority in the Regional/Locales/Available locales list. No change.
    I tried commenting out the section that had "$Item->locale_temp_switch()" in single.main.php in my skin. No change.
    Then I went for the brute force approach and using phpMyAdmin I changed blog_locale in evo_blogs for my blog to en-US-utf8. No change.

Despite all that, the Russian characters render as question marks on the web page, which you can see here: http://shininghappypeople.net/rwotd/index.php?p=59&more=1&c=1&tb=1&pb=1

Observe the first comment and compare it to the screen shot above.

I'm at a loss to figure out where the problem is. Any thoughts?

Don.

2 Aug 23, 2014 16:04

Server/browser caching has complicated the diagnosis, so temporarily I've put this into my html header:

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

This allowed me to determine that the comments are being generated both for posts and pages using _item_feedback.inc.php. I suspect something called up in there is sometimes making a function call that filters output through a non-UTF8 codepage, but I haven't figured out where that is yet.

4 Aug 24, 2014 12:54

Hi, Manuel,

At your advice I re-ran the ut8 upgrade script (ut8_upgrade.php), but it made no difference. (BTW, line 23 in that script should be deleted; line 21 closes the first bit of code.)

I found myself wondering what would happen if I moved the comment to a new page. I did so manually, i.e. by using the "edit" link at the bottom of the comment, then using the "Move to POST ID" field, and then saving. Lo and behold, when linked to the new page, the comment displayed correctly.

So I thought, "Cool, I'll just do an update of all 96 comments using phpMyAdmin and adjust the comment_post_ID for them all."

So I ran UPDATE `evo_comments` SET comment_post_ID = 857 WHERE comment_post_ID = 59 and double checked the comments as attached to the new page. The UTF8 displayed only as question marks. :( So I moved them all back to the original page, and I began to manually transfer all the comments that had Russian. When manually transferred, they all displayed correctly on the new page. And then I retransferred over all the English-only ones using the SQL update.

So, practically speaking, my issue is now resolved, but I have to tell you it is a complete mystery to me what was going on.

Don.

5 Aug 24, 2014 15:09

Wow! That sounds like a lot of work, and I think that the issue might not be totally solved. I went to your home page (http://shininghappypeople.net/rwotd/index.php) and saw many question marks in there.

As I said you in my previous comment, we received some reports like yours. So, I'll try to reproduce your issue first, and then I'll see if the solution applied by the developers solves this one as well.

I'll keep in touch.

6 Aug 24, 2014 15:24

BTW, thanks for pointing out the extra php tag in the manual page. It's already fixed.

7 Aug 25, 2014 18:31

Hi @deljr, I already managed to reproduce your error, but still didn't find any solution. Let's wait until developers check this out.

Do you remember which locale was using that blog in version 2.4? Also, do you know the charset of the database before to make the UTF8 upgrade?

Thanks.

8 Aug 26, 2014 03:06

Hi, Manuel,

I still haven't deleted the old database, so here are the stats from it. If there is a specifi SQL query you want me to run, let me know.

Server charset: UTF-8 Unicode (utf8)
Server connection collation: utf8_general_ci

If you want the whole SQL printout of the database, I'll be happy to provide it. I never deleted it nor tried to upgrade the old database, IIRC; I only made changes in the new database. The original database was a MySQL5 database.

BTW, here you can find how I first made 2.4 work with Russian, which was non-trivial at the time. Perhaps there is a clue there:

http://shininghappypeople.net/deljr/b2e-russian-english.html

Here is a copy of the database details of my old 2.4 database.

Server charset: UTF-8 Unicode (utf8)
Server connection collation: utf8_general_ci

Now here is something interesting. This is the phpMyAdmin printout of the old database's structure.

http://shininghappypeople.net/doc/debugging-2.4-to-5.0.8-upgrade.gif

Note that the collation was a latin1 variation. I'm actually a bit surprised. I'm not sophisticated enough at the moment to know whether in MySQL a table's collation was different from its character set, so perhaps there is an issue there.

All the best, Don.

10 Sep 26, 2014 19:30

This is odd. I've tested my blog under OS X (Firefox, Safari and Chrome) and Windows 8 (Firefox, IE and Chrome) and Android (Samsung tablet and telephone), and the Russian renders perfectly, but I'm still getting reports from readers that they are seeing question marks instead of Russian letters. Since I haven't been able to duplicate the problem, I'm quite confused.


Form is loading...