0

I'm seeing usernames of newly created accounts like 'कविता हेमनà¥à¤¤' within the database itself. From some digging I know that these names are just Facebook account names (I allow Facebook log in) but in non-latin scripts.

I've configured my MySQL db to work in 'utf8mb4' but this doesn't seem to let the names be stored in their original scripts.

Edit: I'm using PHP. On initial connection to the database I specify utf-8mb4 as the encoding but do not specify encoding on the query level.

credo56
  • 423
  • 1
  • 8
  • 19
  • Your database may be configured for UTF8 but is the code that creates the 'insert' statements ? What are you using ? – GreensterRox Mar 22 '17 at 15:33
  • The likelihood is that your problem is not with your database itself, but with either (a) the way you connect to your database, or (b) some other code along the way. Could you [edit] this post to include more details? – TRiG Mar 22 '17 at 15:34

1 Answers1

1

That is Mojibake for कविता हेमन. See Trouble with utf8 characters; what I see is not what I stored and look for "Mojibake". It discusses the problem and the likely causes. See also "Best Practice".

Either utf8 or utf8mb4 suffices. That is, this is not a utf8mb4-specific problem.

Community
  • 1
  • 1
Rick James
  • 135,179
  • 13
  • 127
  • 222