Article ID: 5539, created on Aug 12, 2008, last review on May 4, 2014

  • Applies to:
  • Plesk Sitebuilder for Linux/Unix

Symptoms

National characters put in WYSIWYS

Đuro
Članci
Čakovec
Ferenčica
Žagar


are shown with question mark in site preview  and on the published site.

?uro
?lanci
?akovec
Feren?ica
?agar

Cause

Sitebuilder database and all tables have DEFAULT CHARACTER SET different from UTF8.

Resolution

Be design Sitebuilder creates its database with charset UTF8.

mysql> show create database sitebuilder3;
+--------------+-----------------------------------------------------------------------+
| Database     | Create Database                                                       |
+--------------+-----------------------------------------------------------------------+
| sitebuilder3 | CREATE DATABASE `sitebuilder3` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+--------------+-----------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>

If DEFAULT CHARACTER SET is different from UTF8 for your Sitebuilder installation, it should be changed to UTF8.

mysql> ALTER DATABASE sitebuilder3 CHARSET=utf8;
Query OK, 1 row affected (0.00 sec)

mysql>

All tables inside the database should be reconfigured in the same way.

mysql> ALTER table `site_page` CHARSET=utf8;
Query OK, 21 rows affected (0.06 sec)
Records: 21  Duplicates: 0  Warnings: 0

mysql>
...

And convert content in `site_page` to UTF8.

mysql> ALTER TABLE `site_page` CHANGE `content` `content` LONGTEXT CHARACTER SET utf8 NOT NULL;
Query OK, 21 rows affected (0.06 sec)
Records: 21  Duplicates: 0  Warnings: 0

mysql>

AdditionalInformation

You may get name of Sitebuilder database with help of sb_config:

~# sb_config --help | grep 'Sitebuilder database name'
 --sb_db_name         Sitebuilder database name [sitebuilder3]
~#

Sitebuilder database may get charset other then UTF8 only if reconfigured manually.

d055be4fdc562a8ecb8e6d0bf419f946 fad6dc0c8e983c17ae70a51ac7952cd0 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF