Menu

#13 Database Storage Type (MySQL): Unicode Titles - ????????

1.0
open
nobody
utf-8 (1)
2015-05-21
2015-05-12
Evgeny
No

Hi!

I'm trying External Database (MySQL 5 with InnoDB) as a Storage Type

It works well if there are unicode symbols (e.g. cyrillic letters) in Docmenta text editor.

But I've met a problem with unicode in Section Titles. The '?' symbols appears instead of real symbols (see picture 01.jpg).
I tried to change Titles directly in database table and there were no problems.

1 Attachments

Discussion

  • Manfred P.

    Manfred P. - 2015-05-19

    Hi,

    I was able to reproduce the issue. Obviously Hibernate does not use UTF-8 encoding by default. You can solve the problem as follows:
    Add following lines to the apache-tomcat/webapps/docmenta/WEB-INF/db_config.properties file:

    hibernate.connection.CharSet=utf8
    hibernate.connection.characterEncoding=utf8
    hibernate.connection.useUnicode=true
    

    This worked for me.

    In the next version of Docmenta this settings will be added automatically if not explicitelly set in the db_config.properties file.

    If this does not solve the problem, then you might also try to add the properties useUnicode=true and characterEncoding=utf-8 to the JDBC connection URL, as shown in the following example:

    jdbc:mysql://localhost:3306/docmentadb?useUnicode=true&characterEncoding=utf-8
    

    More information can be found here:
    http://stackoverflow.com/questions/13063372/hibernate-mysql-how-to-set-the-encoding-utf-8-for-database-and-tables

     

    Last edit: Manfred P. 2015-05-19
  • Evgeny

    Evgeny - 2015-05-21

    changing db_config.properties helps, thanks!

     

Log in to post a comment.