0

I am using external DB(charset:latin1_swedish_ci, collation=latin1, MyISAM) with internal DB(utf8mb4_unicode_ci, utf8mb4, InnoDB).

  • customer_name : collation = utf8mb4_unicode_ci
  • customer_email : collation = utf8mb4_unicode_ci

So everytime I get the below exception warning when getting data from external DB.

How should I modify DB setting in my situation? Thanks.


(3/3) QueryException

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF8peri ...' for column 'customer_name' at row 1 (SQL: insert into customers (id, customer_name, customer_email) values (10008, Olsen Naen Klist�pe AS, naen@klist.no))


external DB enter image description here

Internal DB enter image description here


Test System : Win10(64bit), Mysql(v5.7.19, InnoDB), PHP(v7.1), Laravel(v5.4)

JsWizard
  • 1,663
  • 3
  • 21
  • 48
  • Dup of https://stackoverflow.com/questions/46648829/mysql-setting-for-correct-character-and-collation-in-laravel – Rick James Oct 10 '17 at 01:23

1 Answers1

0

If that was supposed to be ø, then you need do one of two things:

  • Switch the encoding of text in the client from latin1 to UTF-8.

  • Tell MySQL that the client is conversing in latin1.

Other charset debugging: Trouble with UTF-8 characters; what I see is not what I stored

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