@dimitrispie opened this Issue on March 19th 2020

We are trying to import logs to Matomo 3.13.3 (mysql Ver 8.0.16)

For the following record:

xxx.xxx.xxx. - - [16/Feb/2020:12:54:13 +0100] "GET /page1/xxx" 200 63545 "https://scholar.google.de/scholar?q=Petersen,+P.+(Hrsg.),+Der+Aufstieg+der+Begabten,+Leipzig:+Teubner,+S.+105%F4%8F%B0%81-120.&hl=de&as_sdt=0&as_vis=1&oi=scholart" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15"

we receive the following error:

Error query: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF4\x8F\xB0\x81-1...' for column 'referer_keyword' at row 1 In query: INSERT INTO matomo_log_visit ...

We have tried to change the collation:

ALTER TABLE matomo_log_visit CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

The error is received again.

@tsteur commented on March 19th 2020 Member

@dimitrispie quickly searched for that error and found https://stackoverflow.com/questions/9522780/special-unicode-characters-cause-exceptions-in-mysql-jdbc

It sounds like some server issue maybe. Not sure which MySQL version you are using etc.

@dimitrispie commented on March 19th 2020

@dimitrispie quickly searched for that error and found https://stackoverflow.com/questions/9522780/special-unicode-characters-cause-exceptions-in-mysql-jdbc

It sounds like some server issue maybe. Not sure which MySQL version you are using etc.

As mentioned above:
Matomo 3.13.3 (mysql Ver 8.0.16)

@tsteur commented on March 19th 2020 Member

I suppose you would also need to change the charset in Matomo which is by default charset = utf8 and can be configured in

[database]
charset = utf8

We are working on utf8mb4 at this moment in https://github.com/matomo-org/matomo/issues/9785 . It will be available with Matomo 4. I'm not sure it's safe to change the charset. I'm closing this issue now as it seems a duplicate of https://github.com/matomo-org/matomo/issues/9785 but happy to reopen if needed.

Hope this helps @dimitrispie

This Issue was closed on March 19th 2020
Powered by GitHub Issue Mirror