Skip to content

My Rant

Mini rants, mostly about Linux admin and PHP code

Tag: error

SQLSTATE[HY000]: General error: 1366 Incorrect string value: ‘\xE2\x80\x8B\xE2\x80\x8B…’ for column

If you get this (or similar) when trying to insert/update in a MySQL database, you table is not able to cope with the extended version of the UTF8 character set.

You will need to convert your table to use the utf8mb4 character set, and utf8mb4_unicode_ci collation.

An example to do so:

ALTER TABLE `your_table_here` CONVERT TO
  CHARACTER SET utf8mb4
  COLLATE utf8mb4_unicode_ci;
Author iainPosted on 12th July 2022Categories ProgrammingTags error, mysql, unicode, utf8, utf8mb4Leave a comment on SQLSTATE[HY000]: General error: 1366 Incorrect string value: ‘\xE2\x80\x8B\xE2\x80\x8B…’ for column

Recent Posts

  • Trouble setting up wireguard-ui in docker
  • Use Canon EOS 90D as a webcam for Google Meet / Skype / Zoom / etc on Linux Ubuntu 22.04 with nVidia hardware acceleration
  • SQLSTATE[HY000]: General error: 1366 Incorrect string value: ‘\xE2\x80\x8B\xE2\x80\x8B…’ for column
  • New hardware, who dis?
  • old and busted: mysqldump, new hotness: mydumper

Recent Comments

  1. stavro purdie on Basic set-up of a 3com 4500 managed network switch
  2. Markus Fornefeld on Basic set-up of a 3com 4500 managed network switch
  3. Alisa on Adding extra fields to FOSUserBundle / SonataUserBundle
  4. Iain Cuthbertson on Setting up an On-Premise instance of Amon
  5. Keith on Setting up an On-Premise instance of Amon
My Rant Proudly powered by WordPress