I have ejabberd 16.01 that works well with MySQL, the problem is that it store only the regular emoji not the 4-bytes emoji. If I use a terminal, connect to the database, set the charset to utf8mb4 and run insert query, I can insert all type of icons, so the db is configured in the right way!
So i ejabberd put a message in offline storage all icons of 4-Bytes become "?????????" is there a way to set the charset to utf8mb4 for ejabberd mod offline?
How can I fix it? Do you have any ideas?
Thanks!
You need two things:
Ensure you have ejabberd 16.02 or newer that forces UTF8MB4 as default for emoji retrieval (Insertion is already in UTF8MB4 since years, if the table is correctly defined)
Ensure your MySQL schema has been properly created with UTFMB4 support.
Related
When we want to store a string with emojis to our MySQL database, we get this error:
Conversion from collation utf8_general_ci into utf8mb4_unicode_520_ci impossible for parameter
Can someone explain to me why Node is sending it as utf8 to MySQL and how I can declare that we have an utf8mb4 collation? I tried several different encodings on the database side, but I think it is a Node.js or driver configuration that is missing.
The backend is based on Express.js, running on a Debian system within an lts-alpine docker container and the request is sent by a React Native app.
Thx, Florian
SonarQube's install guide says that UTF-8 must be set when setting up MySQL. Is there a way I can check if my MySQL instance is compatible before attempting the upgrade?
I've done a few checks and we seem to have UTF8 setup for the client, connection, results, and system. At the database and server level we have swedish case insensitive. We do have UTF8_general_ci set for the collation_collection.
This instance will not be used in a multi language situation (only Us English). Do my settings align with what they should or do I need to spin up an entirely new instance?
You need to configure the url using jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8 (see for example here). Read also the MySql Character Set Configuration documentation page. The settings are used by the SonarQube program, plugins and upgradescripts.
I want to move my MySQL database to an older version server (5.7 to 5.1).
I get errors because it is created using utf8mb4 .
If i manually change utf8mb4 to utf8 the data become unreadable because of multilinguality.
I have access only to phpMyAdmin in both servers so I can't use mysqldump.
Any ideas?
It seems I've figured out a solution.
Use at export mysql40 compatibility mode, replace utf8mb4 with utf8 and change the character set of tables from phpmyadmin to utf8_unicode_ci.
Hope this will save some time from a fellow in future.
Am trying to set up replication between two servers but keep getting the following error
Full Query says:
SET NAMES 'utf8mb4' COLLATE 'utf8mb4_general_ci';
Both master and slave database have collation set as utf8_general_ci.
Any ideas?
please, check if in the destination server you have that collation and charset available.
You can do it with
SHOW CHARACTER SET
http://dev.mysql.com/doc/refman/5.0/en/show-character-set.html
and
SHOW COLLATION
http://dev.mysql.com/doc/refman/5.0/en/show-collation.html
Thanks for all the help. In the end just uninstalled MySQL and installed an earlier version. They seem to be talking to each other now.
I've been looking for some hours for an answer for this one and it seems to be not yet covered. I will try to be as succinct as possible.
I have a client running a web app with some character encoding problems. Specifics:
CentOS 6.3
MySQL Server 5.1.67
ALL tables set to UTF-8
SHOW FULL COLUMNS verifies also that all text columns in each table are UTF-8
Data going into database is UTF-8
Data is served to web clients as UTF-8
No bad characters in output data; forcing browser to Latin1 causes all manner of problems
So, basically, everything is UTF-8, and everything is working perfectly.
EXCEPT... all connections to MySQL must be Latin1, or else the whole system falls apart. I have verified this with the console MySQL client, PHP/Mysql, PHP/Mysqli and the Ruby mysql gem v2.8.1. Issuing a command like "SET NAMES utf8" or using the various API methods to change the connection character set to UTF-8 will cause all multibyte characters to become garbled and unrecognizable.
At the moment there is no major problem here, except of course that using a Latin1 connection to the server does not work at all in my Ubuntu test environment and so my programs keep breaking when I move them into production. But I have a nagging feeling that something cannot possibly be right and it's going to come back and bite my client later on.
MySQL is reporting this upon initial connection to the server:
character_set_client: latin1
character_set_connection: latin1
character_set_database: latin1
character_set_filesystem: binary
character_set_results: latin1
character_set_server: latin1
character_set_system: utf8
And these are the settings that work for UTF-8 data. If I change anything else to UTF-8, multi-byte characters die a miserable death.
If anybody has any idea what is going wrong here and where I can find any better documentation on it, that would be enormously appreciated.