After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 598564 - Has problems encoding mails containing html
Has problems encoding mails containing html
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Mail
0.28.x
Other Linux
: Normal normal
: ---
Assigned To: evolution-mapi-maint
evolution-mapi-maint
: 608487 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-10-15 14:28 UTC by Matthew Barnes
Modified: 2010-05-19 11:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for evolution-data-server (686 bytes, patch)
2010-03-22 07:20 UTC, Luf
rejected Details | Review
ema patch (1.01 KB, patch)
2010-03-22 11:54 UTC, Milan Crha
committed Details | Review

Description Matthew Barnes 2009-10-15 14:28:39 UTC
Forwarding this from a Fedora bug:
http://bugzilla.redhat.com/show_bug.cgi?id=529180


Description of problem:
I use evolution-mapi and i've set default encoding to ISO-8859-1 in evolution.
But still all emails with html that contains the norwegian characters æ, ø and
å gets garbled. The paragraph that contains these letters, gets changed to
'[?]'. The paragraphs that doesn't, is just fine.
But when i change the encoding from default to ISO-8859-1 for that particular
email, the email is displayed correctly. 

It seems that evolution-mapi only interprets the mail-encoding, but not the
html-encoding. Here's the encoding part from the header:
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset="CP28591"

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">

Evolution probably just finds the first encoding and uses that. But when the
encoding is changed to iso-8859-1, everything is fine. If i get the same email
without the html, øæå is displayed correctly.


Version-Release number of selected component (if applicable):
evolution-2.28.0-2.fc12.i686
evolution-data-server-2.28.0-1.fc12.i686
evolution-mapi-0.28.0-1.fc12.i686


How reproducible:
Every email that contains æ, ø, and å.
Comment 1 misager 2010-03-09 10:49:39 UTC
I am having this problem as well (on Ubuntu karmic)

evolution                      2.28.1-0ubuntu2
evolution-data-server          2.28.1-0ubuntu1
evolution-mapi                 0.28.2-0ubuntu1
Comment 2 Espen Stefansen 2010-03-10 16:15:46 UTC
As the original reporter from Fedora, I can say that this still doesn't work on Fedora 13 Alpha with the latest gnome-packages. Without a fix for this, evolution-mapi is useless for norwegian people at least.

evolution-2.29.92-1.fc13.x86_64
evolution-data-server-2.29.92-1.fc13.x86_64
evolution-mapi-0.29.91-1.fc13
Comment 3 Milan Crha 2010-03-16 11:45:56 UTC
Correct. We are waiting for a better support on an OpenChange side, where the character set will be translated properly, transparently for evolution-mapi, to UTF8 and then shown correctly in message body. The expected version of OpenChange including this is 0.10. I'm not sure whether any changes will be necessary on evolution-mapi side to have this working properly, maybe removal of the charset="CP28591" in Content-Type part should be done.
Comment 4 Luf 2010-03-22 07:20:45 UTC
Created attachment 156716 [details] [review]
patch for evolution-data-server

Hi,

  I have same problem with czech and I fixed it with change in evolution-data-server. I'm not sure that this should be fixed with change in openchange.

Let see the primitive patch and adopt it for you encoding.
I think the base problem is that there is no mapping between CP28XXX --> ISO-8859-Y)

I hope it helps and the patch will be used by evolution developers

Luf
Comment 5 Milan Crha 2010-03-22 11:14:47 UTC
The right change, which is working on, is in OpenChange. They also have a table for mapping CP values to charset names. Maybe before it's done there, then we can make a proper change in evolution-mapi, because it comes from there.
Comment 6 Milan Crha 2010-03-22 11:54:37 UTC
Created attachment 156733 [details] [review]
ema patch

for evolution-mapi;

An interim solution until API function are provided from OpenChange (I hope they will provide them). The list of CodePageIDs can be obtained with function from [1], where is also shown an output with codes and encoding names.

[1] http://msdn.microsoft.com/en-us/library/system.text.encoding.getencodings.aspx
Comment 7 Milan Crha 2010-04-01 12:50:25 UTC
Created commit be2cd6d in ema master (0.31.1+)
Created commit 7fa9a45 in ema gnome-2-30 (0.30.1+)
Comment 8 Milan Crha 2010-05-19 11:20:00 UTC
*** Bug 608487 has been marked as a duplicate of this bug. ***