Hello,
i start this thread in the hope that we will end in a working howto convert all WB installations on different server configurations completely to UTF8.
There are different places where you can find UTF8:
1.) The Database Collation
2.) The Database Characterset
3.) The Head-informations of your Template
My goal is to convert all of them to UTF8 and have in the result my pages displayed correctly without wrong characters in the frontend. This means:
1.) Database Collation of all tables and the text- and char-fields have :
utf8_unicode_ci2.) The Database Characterset is then:
utf83.) The content of the database is in the way, that it is displayed correct
4.) The charset in advanced WB-Settings is then:
Unicode (utf-8)In most cases the collation of your server is set to "latin1_swedish_ci" and the characterset to "latin1" and in WB the charset to "Unicode (utf-8)" or sometimes in germany to "Iso-8859-1".
I've done the following Steps.
1.) Make a backup of the database
2.) Convert the Content of the database
3.) Change the collation and the characterset of the database
4.) Change charset of WB
1.) Make a backup of the databaseUse phpmyadmin to export your database to a .sql file on your local machine
2.) Convert the Content of the database (only needed if your WB-charset is not "Unicode utf-8")- Make a copy of your database export
- Open this file with a editor (e.g. Notepad++)
- Store this file in "ANSI"
- convert the file to "UTF8 without BOM"
- import the file to your database on the server
3.) Change the collation and the characterset of the database- rename the attached file from .txt to .php
- adapt the file to the settings for your database (Line 24-27)
$mysqlserver = 'localhost' ; //Host
$mysqluser = 'User'; //User
$mysqlpw = 'Password'; //Password
$mysqldb = 'Database'; //Database
- upload this file to the root of your server
- Call the sript in your browser:
http://www.your.domain.com/mysql_change_collation.php- Delete the script from your server
4.) Change charset of WB (only needed it is not set to "Unicode utf-8")- go to advanced setting of WB and change the charset to "Unicode (utf-8)"
Now your done and your site should work as before without wrong characters in the frontend.
DisadvantagesWB 2.8.x does not use "set names" to store in the database. This means that all special chars (e.g. "ü") are stored in the database as "ü", but all WB-script can handle this.
In the hope of a good discussion and maybe other better ideas
Matthias