Skip to content
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

ISO-8859-1 encoded URLs in Safari #3231

Closed
anonymous-matomo-user opened this issue Jun 18, 2012 · 8 comments
Closed

ISO-8859-1 encoded URLs in Safari #3231

anonymous-matomo-user opened this issue Jun 18, 2012 · 8 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@anonymous-matomo-user
Copy link

I have a problem on one of my sites that is using ISO-8859-1 encoded sites. When tracking firefox (MAC FF 12.0) the url show up as:
"f%F6rvaltning"
no problem here, character "" is url encoded with ISO encoding (UTF-8 encoding of same character should be %C3%B6 instead of %F6)

but when it is tracking a safari browser (MAC SF 5.1) it shows up as:
"frvaltning"

This leads to duplicate entries in log_action and does not look so good in the reports.

I have not seen this problem in the sites using UTF-8 encoding so I believe it is limited to ISO-8859-1 but I might be wrong.

@mattab
Copy link
Member

mattab commented Jun 19, 2012

Thanks for the report. Are you able, which would be VERY useful, to reproduce the issue with a very simple HTML page, and a piwik JS code inside? if so can you pelase attach here the page that you use to reproduce the issue?

Thanks!

@anonymous-matomo-user
Copy link
Author

Attachment:
urlencode.zip

@anonymous-matomo-user
Copy link
Author

Attachment:
screenshot.31.png

@anonymous-matomo-user
Copy link
Author

I have tried the following browsers:

WI7 FF  13.0
WI7 SF  5.1
WI7 CH  19.0

When looking at log_visit and live visitors for the test page (see urlencode.zip) everything looks to be in order. On the Visitors tab I see invalid characters with the latin1 page (see screenshot.31.png).

I have not been able to recreate the original issue yet.

The original issue is that invalid characters are saved to log_visit table. I still see invalid characters in live visitors and being saved to log_visit with Safari 5.1 on Mac, iPhone and iPad so I will try to get hold of one of these and attempt to recreate the issue again.

@anonymous-matomo-user
Copy link
Author

Ok found it, the url with encoded characters need to be intepreted by the browser as an folder or file and not parameters. (Ok to use rewrite rules in the webserver)

I am attaching file that should replicate the error using Safari 5.1 on win 7 on IIS when clicking the Latin1 link (Replicating the error on linux might require rewrite rules, let me know if I should post an apache config that replicates this)

@anonymous-matomo-user
Copy link
Author

Attachment:
aao.zip

@mattab
Copy link
Member

mattab commented Jul 19, 2012

Thanks, We'll try to take a look soon before next release, unless you submit a patch first ;)

@robocoder
Copy link
Contributor

We can't determine the page's encoding using cross-browser javascript.

If you have latin1 characters in filenames, you'll have to utf8_encode it, e.g.,

tracker.setCustomUrl(unescape(window.encodeURIComponent(window.location.href)));

@anonymous-matomo-user anonymous-matomo-user added this to the 1.8.3 - Piwik 1.8.3 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants