[solved] PDF Reports - Charset Problem

Hello,
The charset is problematic in my pdf reports.
Accents are not displayed correctly:

How can I solve this please ?

[quote=jOoL]
Hello,
The charset is problematic in my pdf reports.
Accents are not displayed correctly:

How can I solve this please ?[/quote]

I am getting the same problem the the charset. I wold love to know the answer. Thanks, Byron.

Hi

is it new in 1.2 , or did you have the problem in 1.1.1 as well?

[quote=matt]
Hi

is it new in 1.2 , or did you have the problem in 1.1.1 as well?[/quote]

Hi, I had the problem in 1.1.1 as well.

What charset is your website using? can you put your page URL with some buggy name so I can see the request to piwik?

[quote=matt]
What charset is your website using? [/quote]
iso-8859-1"

[quote=matt]
can you put your page URL with some buggy name so I can see the request to piwik?[/quote]
http://www.cailler-electromenager.ch/contacts.html?message=S�che-linge+Miele%2C+s�rie+4000+-+T+48-39+C+CH#contact

Thanks
jOoL

i’ll open a ticket. I don’t think we handled charset/encoding conversion for page titles. (We do for search engine keywords.)

Thanks a lot !

This should now be fixed in http://dev.piwik.org/trac/changeset/4080

Note: it won’t convert page titles already recorded/archived.

(Edit: That didn’t fix it. Ticket sanitizeInputValue() - improvements · Issue #2185 · matomo-org/matomo · GitHub has been re-opened for reinvestigation.)

JOol: are you using the PiwikTracker class to track those contact URLs?

I use standard JS script:

Oh, I see.

We can’t fix this because piwik.js already encodes the action name (using %xx for special chars). Your example results in double encoding because you’re passing in a URL that’s already encoded.

You should use unescape() or decodeURIComponent() first, e.g.,


// depending on the URL:
piwikTracker.setDocumentTitle(unescape( url ));
// or
piwikTracker.setDocumentTitle(decodeURIComponent( url ));

These forms would work:


// \x - followed by hexits
piwikTracker.setDocumentTitle("/contacts.html?message=S\xE8chelinge+Miele\x2C+s\xE9rie+4000+-+T+48-39+C+CH" ) ;

// html entity code , &# decimal ;
piwikTracker.setDocumentTitle("/contacts.html?message=Sèche-linge+Miele,+s&#%233;rie+4000+-+T+48-39+C+CH" ) ;

// or UTF-8
piwikTracker.setDocumentTitle("/contacts.html?message=Sèche-linge+Miele,+série+4000+-+T+48-39+C+CH"  );

Thanks I used


piwikTracker.setDocumentTitle(unescape( url ));

and it works now.

Not the other solution.

Thanks a lot!