I'm attempting to insert some UTF-8 data into MySQL on dbfiddle.uk
I've tried various methods of formatting the string, however I invariably get an error along these lines:
> Incorrect string value: '\xF0\x9F\x98\xB2' for column 'v' at row 1
How do I get dbfiddle to accept a UTF-8-encoded string?
`utf8` in MySQL is a synonym for `utf8mb3`, which encodes to a **maximum of three bytes**. You cannot encode the 😲 character in three bytes of UTF8.
The example given works using the sensible db<>fiddle default of `utf8mb4` (allowing the full range of up to four bytes):