New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mail.ru search engine results encoding has changed #2761
Comments
(In [5413]) fixes #2761 - confirmed that go.mail.ru search results are now utf-8 |
As for now, Mail.ru uses UTF-8 in most cases. But rarely it still uses windows-1251 too. I had to change extractSearchEngineInformationFromUrl function in /core/Common.php
It works with
in /core/DataFiles/SearchEngines.php |
Thanks for the patch. I don't think we need to support comma separated list. We do have to check for mbstring and have a unit test. |
Comma separated list is already supported by mb_detect_encoding. By the way, mb_strtolower is already used in Common.php (in original Piwik code in the extractSearchEngineInformationFromUrl function) without any checks tests. |
Can you provide a sample referrer url with windows-1251 encoding? I've done some refactoring and added some more tests, but can never have enough. |
Awesome! Thanks! |
(In [5682]) fixes #2761 |
File: SearchEngines.php
Original (shows incorrect encoding):
// Mail.ru
'go.mail.ru' => array('Mailru', 'q', 'search?q={k}', 'windows-1251'),
I changed to:
// Mail.ru
'go.mail.ru' => array('Mailru', 'q', 'search?rch=e&q={k}'),
And now it seems to work correctly.
The text was updated successfully, but these errors were encountered: