0

I'm working with a Korean payment gateway and one of the responses from the bank comes back like this:

Á¤»ó

When trying to insert that value into MySQL database, I get an error:

Incorrect string value: '\xC1\xA4\xBB\xF3'

I have tried changing the collation in that column to utf8mb4_unicode_ci and utf8mb4_general_ci with success.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Thomas Charlesworth
  • 1,789
  • 5
  • 28
  • 53
  • Possible duplicate of [Difference between Encoding and collation?](http://stackoverflow.com/questions/7723648/difference-between-encoding-and-collation) – shmosel Jan 12 '17 at 03:43
  • http://stackoverflow.com/questions/341273/what-does-character-set-and-collation-mean-exactly – shmosel Jan 12 '17 at 03:43

1 Answers1

0

Here's my 'top' answer:

If you were expecting to see 정상, then we need to talk about euckr, not utf8.

We need to understand where the bytes are coming from, what the CHARACTER SET is on the column in the table (SHOW CREATE TABLE), the client language (Java/PHP/etc), and perhaps more things.

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