Bug 2768

Summary: Wrong detection of charset in Youtube notification e-mail
Product: Claws Mail (GTK 2) Reporter: Dan <dan76>
Component: Plugins/FancyAssignee: users
Status: RESOLVED INVALID    
Severity: normal    
Priority: P3    
Version: 3.9.0   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Youtube notification with wrong charset
none
Raw message from youtube none

Description Dan 2012-10-30 21:13:08 UTC
Created attachment 1177 [details]
Youtube notification with wrong charset

Salvatore, I know what's happening with Fancy and Youtube notification e-mail. Fancy is detecting the wrong charset:

fancy_viewer.c:141:using windows-1252 charset

where it should detect it as UTF8 since Youtube e-mail uses UTF8 as charset. Here it's the meta tag:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

So do you have a fix for this?

Ps: this only happens with Youtube notifications.
Comment 1 Ricardo Mones 2012-12-04 10:10:36 UTC
Can you attach the raw file of one of these mails? You can obscure email addresses, server names/addresses or even content between boundaries you don't want to expose, of course, those are not important.

Anyway I suspect this is a bug of Youtube: the wrong displayed chars are just one char, like ISO-8859-1 displayed as UTF-8. If they were UTF-8 displayed as ISO-8859-1 they should be two wrong chars.
Comment 2 Dan 2012-12-04 17:44:46 UTC
Created attachment 1200 [details]
Raw message from youtube

Hi Ricardo! It's attached.

A way to fix it is simply changing the line (notice the broken '">':

    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8=
">

to this:

    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8=">
Comment 3 Ricardo Mones 2012-12-04 18:31:45 UTC
The change you mention doesn't fix anything here (CVS version), but if I change the head line to:

<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-1=
">

It renders perfectly, as the HTML is in fact ISO, not UTF-8.

Sorry, but I'm afraid this is a Youtube generator bug.