Use unicode characters (4 bytes) in a string gives error message
So, right now I have some data in JSON files that I want to build a MySQL database of.
The problem is that there are some characters like 🛋
The hex value for this character is f0 9f 9b 8b
This works fine in MS SQL Server, but I am getting an error message when trying to insert this into MySQL.
I created the table "test" and trying to run
Insert into test (Name)
values (N'🛋')
Error Code: 1366. Incorrect string value: '\xF0\x9F\x9B\x8B' for column 'Name' at row 1
the column "Name" in my table is a varchar utf8mb4, so I thought this would work. Also, I should mention that I am using MySQL Workbench.
Subject
Written By
Posted
Use unicode characters (4 bytes) in a string gives error message
October 10, 2022 09:18PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.