Sitebuilder does not save national characters correctly, they are shown as question mark (?) on the published site and in site preview. Is that correct?

Article ID: 5539 
Last Review: Oct,6 2008
Author: Bezborodova Anastasiya
Last updated by: system APPLIES TO:
  • Sitebuilder 4.x 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>

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


Subscription for this article changesSubscription for this article changes

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
* - required fields