Handling UTF Encoding for Metadata database

Modified on Tue, 5 Mar at 9:16 PM

Smarten uses MySQL or HSQL DB as its metadata database.


If the MySQL character encoding or HSQL DB character encoding is not UTF-8, the issue in displaying Smarten meta-data such as object title, object properties, etc. with special characters occurs. 

The UTF-8 character encoding set supports many alphabets and characters for a wide variety of languages.


In HSQL DB, by default, the character set encoding will be UTF-8. But, the default character set for MySQL is Latin, and MySQL may not display some characters properly.


To resolve this, encoding of metadata database should be set to UTF 8 encoding. 

 

Solution:

 

If the MySQL database is not created yet, the below code has to be added with the syntax on MySQL console.

 

CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;

                                                                                                               

If the database (MySQL and HSQL) is already created, then use the below code in the console.

 

ALTER DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;





 

Note: This article is based on Smarten Version 5.0. This may or may not be relevant to the Smarten version you may be using.

UTF Encoding metadata MySQL HSQL UTF8 Latin

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article