2

I have a problem with strange character.

In mysql this character cause error Incorrect string value: '\xF0\x9F\x92\x80'

Samples of these characters are from https://foursquare.com/v/shabushi-%E0%B8%8A%E0%B8%B2%E0%B8%9A%E0%B8%8A/4b72452cf964a5203c762de3

Say I want to analyze data from the web and found some strange character

how to remove this character ??

The occurance is rare.

In fact, how to know all characters that may be problematic for mysql and remove that? I am not saying escapeable characers. I am saying characters that are neither numeric, alphabeth, or chinese scripts, or punctuation. Characters that's totally bizarre.

How do I get rid of that from a string?

Mathias Bynens
  • 144,855
  • 52
  • 216
  • 248
user4951
  • 32,206
  • 53
  • 172
  • 282

1 Answers1

1

Older versions of MySQL can't deal with characters outside the BMP; upgrade your MySQL to at least 5.5 and set the column to use the utf8mb4 charset.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358