@KALLIAK opened this Issue on October 25th 2019

We have site in russian language in windows-1251 codepage and all working fine except internal site serch keywords.

E.g. when I try to find ‘окрб’ this keyword turns to url encoded ‘q=%EE%EA%F0%E1’ and then in database it turns to some wierd encoded string ’ îêðá’.

There is small 2-HTML page site (windows-1251) where the problem can be reproduced:

Matomo 3.11.0

@tsteur commented on November 3rd 2019 Member

@mattab moved this to 4.1.0 as it's not a regression.

@sgiehl commented on December 18th 2020 Member

I've just checked that one. For me it seems to work as expected. Maybe that is meanwhile fixed with utf8mb4 support.

@tsteur commented on December 20th 2020 Member

Hi @KALLIAK it looks like this might be fixed. If you can still reproduce this using Matomo 4 after migrating the DB to UTF8MB4 then please comment here and we will be happy to reopen the issue and investigate again.

@KALLIAK commented on December 21st 2020

Hi @tsteur Just tested my test.zip with the freshly installed Matomo 4.0.5 and the problem remains.
This problem has nothing to do with the database, because the GET request to the tracker passes already corrupted keyword, i.e. the problem is in matomo.js, namely in the call "locationHrefAlias = safeDecodeWrapper(locationArray[1])". safeDecodeWrapper("%EE%EA%F0%E1") returns "îêðá", but it "must" return "окрб". When I remove "safeDecodeWrapper" and leave "locationHrefAlias = locationArray[1]", the problem goes away, but it is not a solution as far as I understand.
But for more than a year I solve the problem this way, with each patch I have to mess with yuicompressor-2.4.8.jar, etc.)

@sgiehl commented on December 21st 2020 Member

@KALLIAK Which browser are you using? I had tried your example, and as long as the encoding of the file is windows-1252 and served as such it worked at least in Chrome. When you are viewing the page in your browser is the page title displayed correctly?

@KALLIAK commented on December 21st 2020

We have windows-1251 encoding. We tried all famous browsers.
When I try to find "тест", I get this url: "matomotest/find.html?q=%F2%E5%F1%F2"
And then it turn to this request:

@sgiehl commented on December 21st 2020 Member

Checked that again and now I was able to reproduce.

@sgiehl commented on December 21st 2020 Member

this would actually be solved with #16628

Powered by GitHub Issue Mirror