Recent Topics

1 Feb 18, 2014 07:55    

I am switching our blog to a new fresh server.

I have transferred all the files and database and the new system is running.

The problem is that the system is reporting a different Internal b2evo charset on the new server than on the old one.

What setting would I need to change to fix this?

Old server is reporting ISO-8859-1 and new one is reporting UTF-8.

2 Feb 19, 2014 12:38

I managed to fix the charset problems by changing the following settings in _locales.php:

$evo_charset = 'iso-8859-1';
$force_io_charset_if_accepted = 'iso-8859-1';

But I am still having large problems in the new server.

The dropdown which lists all the blogs in the dashboard is missing about half of the blog names. It seems the missing names all contain Scandinavian characters (å, ä or ö)

Also editing blog text results in the blog_content field in b2_items emptying in the database.

I think the main problem is with the fact that our old server was using PHP 5.3 which I think still used default charset of ISO-88591. The server is running PHP 5.4 and that leads to problems.

3 Feb 20, 2014 06:19

I did not check but I don't think iso-8859-1 is a safe bet. AFAIK it's mostly suitable for English only.

For true multilanguage support you should make sure that all of your tables and sub-tables are utf8_general_ci as well as the main db collation (go to phpmyadmin > select db > hit 'operations' tab and set 'collation' to utf8 as well. There's a script somewhere for quickly converting them all you might want to search it.

If all of your tables' collation is set to utf8 properly you should not need any of those force_charset etc.

Please note that, if due to some incompatibility your characters are already converted to ???'s or other weird characters already and saved to db that way, that would not make them go back to their proper characters.

4 Feb 20, 2014 06:36

Hi @hypocrite,

If the new server encoding is UTF-8, why don't you try it backwards? I mean, the b2evo developers encourage to use UTF-8 starting with version 5.

Maybe it is not exactly your case, but this page could be useful: http://b2evolution.net/man/advanced-topics/troubleshooting/illegal-mix-of-collations. Also, this other page explains the available methods to perform the conversion: http://b2evolution.net/man/installation-upgrade/upgrading/upgrade-database-to-utf8.

Remember: make a copy of your database or a full-backup of your site before to make any conversion.

Regards!

5 Feb 20, 2014 07:20

Actually the current b2evolution installer does not seem to offer the conversion to UTF-8 anymore?

I got it working by running a simple PHP script which converted the database from ISO-8859-1 to UTF-8.

But it would have been easier if the b2evo would have offered that option which is also described in the manual you linked.

6 Feb 20, 2014 07:51

Yes @hypocrite, actually, the conversion tool will be available in version 5.1. The script is a workaround included there for cases like yours to be solved easier than manually changing the database encode (that was the only option until a couple of months ago).

Btw, does it solved your issue?

Thanks.

7 Feb 20, 2014 13:22

Yes, converting the database to utf-8 seems to fix the problem.


Form is loading...