Database encoding not utf-8 in default

István Tóth
Added over 3 years ago

After installation I realised that some special character like 'ő', 'ű' displayed as '?' in MUC history.

The MySql data table muc_history and msg_history is not UTF-8. I set the tables and rows to 'utf-8-general-ci'

The online delivery okay, the special characters arrive, but the offline messages, and MUC history is still problematic.

After I set the encoding, the Web admin broke down when I try to join room, with special chars in room log. Few rows are arrive then:

'<x stamp="20150829T10:57:20"

xmlns="jabber:x:delay" from=""/></message' <-broken XML content, end of response...

Non-web client connection still okay, connected, send MUC messages.

I reinstall the DB, without any content I set the encoding to utf-8

After send a special char in message at web admin muc room, I get this:

<body host="" xmlns:stream="" xmlns="http://jabber

.org/protocol/httpbind" xmlns:xmpp="urn:xmpp:xbosh" secure="true" from="" ack="9595270"

xmpp:version="1.0"><message xmlns="jabber:client" from="" to="admin" type="groupchat">őú<delay xmlns="urn:xmpp:delay"


the stanza is broken, and the BOSH connection stop.

Replies (2)

Added by István Tóth over 3 years ago

I fixed the database problem with this steps:

  1. (MySQL 5.5.1) Add 2 lines at etc/mysql/my.cnf


character-set-server = utf8

collation-server = utf8_general_ci

  1. restart Mysql server

$ service mysql restart


At mysql console (probably not necessary)


  1. I rename muc_history table to muc_history2 table just for sure

  2. restart Tigase server

  3. join a room - the muc_history table automatically created in UTF-8

All the special chars are okay

Web admin room history display still error with broken XML stanza! (you have to refresh & log in again)

Client software okay

Web client with and websocket connection okay.

Added by Wojciech Kapcia TigaseTeam over 3 years ago

We encourage UTF8-capable MySQL configuration in the documentation: Configuring MySQL for UTF-8 Support We don't enforce UTF8 on schema level while creating schema for MUC component (it will be created as such with above config).