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>Additional information
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.
Keywords: DEFAULT CHARACTER SET; national characters; question mark; UFT8