0

So I work with the usernames from a service and some of them contain weird characters. One for example contains or another example would be .

I struggle to geht them into my database. When I try to manually enter them I get Warning: #1300 invalid utf 8 string.

After some googling I found out that it's probs because it's a 4 byte character and that I'm supposed to set the collation to utf8mb4_general_ci which I tried but didn't help. I also tried to set it to utf32_general_ci. Now interistingly if I set it to utf32_general_ci, I still get the "invaild utf8 string" error and not invalid utf32. I don't understand why. Do I need to change something else besides collation?

I'm trying to enter the data via phpMyAdmin. It is running on a debian webserver that is managed mostly via plesk but I do have SSH access which I use occasionally.

  • 2
    Possible duplicate of [UTF-8 all the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Obsidian Age Apr 17 '19 at 04:55
  • `utf84mb_general_ci` does not exist; you probably meant `utf8mb4_general_ci`? `""` looks like a valid UTF-8 string; does it work if you copy-paste it from Stack Overflow (in case the original has weird non-compliant byte sequences)? – Amadan Apr 17 '19 at 04:57
  • Yeah sorry that's what I meant, fixed it now. I tried copying it from here but same result. – togirachetowa Apr 18 '19 at 10:56

0 Answers0