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
1
vote
1 answer

How to insert special characters in SQL Server?

Much like this question in MySQL, I am trying to retain special characters such emojis into an nvarchar type column. However, any emojis are converted to "??". I have tried to reproduce the question's solution including changing column type and…
chandler
  • 71
  • 3
  • 9
1
vote
1 answer

MySQL to postgres migration issue

I want to migrate my project from MySQL to postgres, I have one table in MySQL, in which utf8mb4 set for particular column in a table, what alternative is there in postgres to set in column for encoding?
neetu
  • 11
  • 3
1
vote
1 answer

Laravel exception: 1366 Incorrect string value: '\\xC0\\xA7\\xC0\\xA2%2...' for column 'user_agent'

Occasionally I will get the following exception thrown from Laravel: "class": "Illuminate\\Database\\QueryException", "message": "SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\\xC0\\xA7\\xC0\\xA2%2...' for column 'user_agent' at…
Oli Girling
  • 605
  • 8
  • 14
1
vote
1 answer

MySQL: 1366 Incorrect string value: '\xE0' in utf8mb4 column

I'm getting errors when certain characters are being added to a table... even when the column is has utf8mb4 character set. For example: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xE0' for column 'surname' The data in question…
Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289
1
vote
0 answers

Table with latin1 collation slow query, fast with utf8mb4 - why?

Table A is 25k rows with a dozen columns, about 8mb of total data set to latin1. Table B has 2000 rows with two dozen columns, about 5mb of total data set to utf8mb3. Doing an inner join between the two the overall query time is 1.3 seconds. If I…
user2280032
  • 372
  • 2
  • 5
  • 16
1
vote
3 answers

UTF-8 decoding when reading a MySQL column of type JSON (vs. TEXT), using Perl DBI + DBD::mysql

Here is the problem, in a working unit test. I think it's either a bug in DBI + DBD::mysql, with respect to how it handles MySQL JSON columns, or a bug in my brain. use strict; use warnings; use utf8; use Test2::V0; use Test2::Plugin::UTF8; use…
yahermann
  • 1,539
  • 1
  • 12
  • 33
1
vote
2 answers

Tracking down MySQL utf8 vs. utf8mb4 Issues

We have a database that is utf8mb4 and utf8mb4_unicode_ci through and through. I've even exported all SQL code of the entire "project" (via dbForge) and can't find a single reference to UTF8 in the entire project. I've verified all tables use the…
Floobinator
  • 388
  • 2
  • 11
1
vote
1 answer

PDO fails to return MySQL search using COLLATE utf8mb4_unicode_ci

I have a simple PHP PDO query on a MySQL table which returns one result in phpMyAdmin console but fails to return any rows within PHP using the query below... Why would/could there be a different result from within phpMyAdmin and from a PDO…
RPB1001
  • 11
  • 2
1
vote
1 answer

What is the difference between utf8mb4_unicode_ci and utf8mb4_unicode_nopad_ci?

I chose the utf8mb4 character set for my database. What is the difference between the utf8mb4_unicode_ci and the utf8mb4_unicode_nopad_ci collations?
kintsukuroi
  • 1,332
  • 16
  • 15
1
vote
0 answers

JSON UNESCAPED UNICODE is not working on Text Field in Laravel Nova admin panel

I am developing a web admin panel using Laravel Nova. I'm getting an issue about Japanese character saving to Database. My environment is as follows: Laravel Version: 7.14.1 Nova Version: 3.6.0 PHP Version: 7.3.11 Database Driver & Version: MySQL…
1
vote
0 answers

Convert UTF8MB4 additional characters back to UTF8 counterpart

Due to the problems with the driver of a specific software program(we can't change or upgrade) we need to translate the additional characters of UTF8MB4 back to UTF8 for example the Bold and other styled characters in the MB4, must turn to…
Gix
  • 23
  • 5
1
vote
0 answers

How can I write emoji on Node.Js

I use Node.js, MYSQL and want to write emoji. My MYSQL's character set and collation all sets on 'utf8mb4' and when I insert emoji with SQL, I can see emoji well. (Probably It means There's no problem in MYSQL settings) But When I send emoji with…
MinJoon
  • 11
  • 1
1
vote
2 answers

What difference in schema VS table VS column CHARSET in MySQL?

What difference in schema CHARSET VS table CHARSET VS column CHARSET in MySQL? When I change my table's charset to utf8, can I use utf8mb4 charset in my column? Thanks.
1
vote
2 answers

OroCommerce 4.1.2 UTF8MB4 Install error "1071 Specified key was too long; max key length is 3072 bytes"

Fresh pull of the recent 4.1.2 package and when config.yml is set to use with utf8mb4 -- @Michael Bessolov doctrine: dbal: charset: utf8mb4 default_table_options: charset: utf8mb4 collate:…
C-P
  • 21
  • 3
1
vote
0 answers

Database Conversion to UTF8 Leaves Bad Encoding Gremlins

I just changed my MySQL database table from utf8 to utf8mb4 so that my CMS could use emoji, etc. I'm finding though that some of the old content now is showing "gremlins" that previously displayed as proper text. I think most of them are from…
Timothy R. Butler
  • 1,097
  • 7
  • 20