Mattermost Peer-to-Peer Forum

Slash Commands - which character encoding is used



I am working on a slash command project (sending SMS) that takes a Text from the slash command.
The question is now: what is the character encoding? printing on the console seems to hint into latin1, it does not look like utf-8.

Also, when passing this string back to mattermost to create a dialog it mangles the non ascii characters again to something different.

Maybe somebody who has worked with non ascii charset can shed a light on that?

TIA from Germany


Hi there, @ipsecguy

I ran the following command on the database command line and verified that it is set to latin1:

mysql> SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "mattermost";
| default_character_set_name |
| latin1 |
1 row in set (0.00 sec)

However, checking through the config.json file, the charset is supposed to be set to utf8:

root@mm:/# cat /mm/mattermost/config/config.json | grep -w “DataSource”

I would take a guess that you were referring to this discrepancy. Can you please confirm which Mattermost server version that you are on and confirm where you see the mangled non-ASCII characters (desktop / web / mobile client) by sending some screen shot(s)?