Questions tagged [utf8mb4]

Unlike its `utf8` encoding, MySQL’s `utf8mb4` encoding offers full Unicode support (including four-byte UTF-8-encoded symbols).

Unlike its utf8 encoding, MySQL’s utf8mb4 encoding offers full Unicode support (including four-byte UTF-8-encoded symbols).

The utf8mb4 character set is useful because nowadays we need support for storing not only language characters but also symbols, newly introduced emojis, and so on.

utf8mb4 has been available since MySQL 5.5.3 (released March 2010).

A nice read on How to support full Unicode in MySQL databases by Mathias Bynens can also shed some light on this.

More information about the utf8mb4 character set may be found on the official MySQL Documentation.

398 questions
0
votes
1 answer

Issue when migrating data in charset latin1 from MySQL 5.7 to 8.0

My company faced an unpleasant issue when we upgraded our MySQL DB hosted in AWS RDS from version 5.7 to 8.0. Initially, we had MySQL 5.7, where the previous dev team left the charsets and collations default. Charset was latin1, and the collation…
0
votes
1 answer

Tcl, database insertion mysqlexec/db server: Incorrect string value:

I have a weird issue for several years now. Here's the thing. I run Rocky Linux (happens also in CentOS), running Apache 2.4.53 wiith MariaDB (mysql Ver 8.0.30 for Linux on x86_64 (Source distribution) I have a Tcl script which executes a "curl" to…
0
votes
1 answer

How to use emojis (or other utf8mb4) characters in a column alias of a MySQL query?

I'm using SuiteCRM 7 with a MySQL 8.0.31 database. I have taken steps to migrate the MySQL database to accept utf8mb4 characters which works well when entering in, say, emojis into table data either with the SuiteCRM web frontend or HeidiSQL. I am…
2xaronl
  • 3
  • 3
0
votes
0 answers

How to convert a MySQL table's character set and collation to UTF-8?

This has been asked before and answered: How to convert an entire MySQL database characterset and collation to UTF-8? The right answer is along the lines of: ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE…
tinkerr
  • 975
  • 2
  • 14
  • 32
0
votes
0 answers

Save SQL in Windows, to upload in Plesk

Very confused about charsets. I've a script to download a .sql file that contains Sql tables. I use MySql. My tables are like this: CREATE TABLE `xxx` ( `id` int(11) NOT NULL AUTO_INCREMENT, `notes` mediumtext NOT NULL PRIMARY KEY (`id`) )…
Gianluca Demarinis
  • 1,964
  • 2
  • 15
  • 21
0
votes
1 answer

How to get mysqldump to export a database in the right encoding and collation?

I'm having a problem with the encoding when dumping a database using mysqldump. The issue is that the file being generated is breaking non-ASCII characters (for ex. german and spanish characters). The data in the DB is right, but it is exported…
versvs
  • 643
  • 2
  • 12
  • 30
0
votes
2 answers

How do I to export utf8mb4 mysql data using php to a csv file

I am looking for help on a csv file export. I have a mysql database encoded as utf8mb4 (unicode_ci) with a table using collation utf8mb4_unicode_ci for my fields. The data contains special characters such as copyright symbols, foreign characters…
JLR-Syn
  • 1
  • 1
0
votes
1 answer

how to convert raw utf8mb4_unicode_ci like X'313735313136' to a regular string (utf8) in php

This question is about converting a raw utf8mb4_unicode_ci from a .sql to a normal utf-8 My .sql was from a database that had COLLATE utf8mb4_unicode_ci like this : (5558,'2019-11-18 18:28:36',X'313735313136','am',''), in PHP how would I convert…
Jintor
  • 607
  • 8
  • 32
0
votes
2 answers

MySQL 5.7 select where Unicode SMP area char equal

I want to select table use character in Unicode CJK Extension-B. select * from saseung where hanja = ''; But the result shows all CJK Extension-B characters in the table. , , , , , etc I guess MySQL check only the first two characters of ''. my…
0
votes
2 answers

"Incorrect string value" when trying to insert UTF-8 into MySQL from Rails

While debugging my Rails App I found the following messages in the log file: (0.1ms) ROLLBACK Completed 500 Internal Server Error in 25ms (ActiveRecord: 4.2ms) ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xF0\x9F\x98\x89…
bjelli
  • 9,752
  • 4
  • 35
  • 50
0
votes
1 answer

Python/Mysql UTF8/UTF8MB4 configuration problem?

Since last release of Wordpress I get a /usr/lib/python3/dist-packages/pymysql/cursors.py:170: Warning: (3719, "'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release error in out logfiles.…
0
votes
0 answers

Still get the replacement character error even after modifying the table characterset and collation

The MySQL version is 8.0.16 I modified the table character set and collation : alter table pdrintervention character set utf8mb4 collate utf8mb4_0900_ai_ci; At runtime I still get the Incorrect string value: '\xEF\xBF\xBD' error when importing a…
pheromix
  • 18,213
  • 29
  • 88
  • 158
0
votes
2 answers

How does php utf8_decode deal with utf8mb4?

I am working on localhost windows10 apache 2.4: Apache/2.4.51 (Win64) OpenSSL/1.1.1l PHP/8.0.11and Database client version: libmysql - mysqlnd 8.0.11 which uses the server Server version: 10.4.21-MariaDB - mariadb.org binary distribution. It is by…
user31782
  • 7,087
  • 14
  • 68
  • 143
0
votes
1 answer

Hi, I am trying to find all instances of utf8mb4_bin in my table, using REGEXP, but cannot get the right results

I can find single chars using: SELECT * FROM table WHERE column LIKE '%Â%' COLLATE utf8mb4_bin; -- 1 result: 246.8 ± 11.7 I have tried a dozen or more REGEXP with COLLATE utf8mb4_bin, but none return what I need. Like: SELECT * FROM table…
0
votes
1 answer

MariaDB query won't run via PHP, works manually with HeidiSQL; en dash encoding issue; proper DB utf8mb4 character set and collation

I'm importing emails from a Gmail account and storing them in a database. Apparently my PHP logic to convert everything to UTF-8 has failed with one particular email and when I run the query with that email I receive the following MariaDB…
John
  • 1
  • 13
  • 98
  • 177