[prev in list] [next in list] [prev in thread] [next in thread]
List: sylpheed
Subject: [sylpheed:25603] Fallback Encoding
From: Guillaume Castagnino <casta () xwing ! info>
Date: 2005-08-21 0:05:46
Message-ID: 20050821020546.26f5750f.casta () xwing ! info
[Download RAW message or body]
[Attachment #2 (multipart/mixed)]
Hi,
I have a problem with mails that don't specify a codeset. There are many bad
clients that do this (such as outlook...) :
I use automatic codeset so those mails are converted with a
locale-encoding-to-UTF-8 conversion. BUT my locale is fr_FR.UTF-8, so those
mails are not converted at all !
Generally, such mails are us-ascii or iso-8859-*, not utf-8, so to see those
mails correctly, I must force encoding. This solution is not good, because
in this case, mime-encoding value is overidden on correctly encoded stuff, so
correctly encoded mails are not correctly displayed...
A configurable fallback encoding should be definitly a good thing as it was
already suggested here : http://www.tmtm.org/cgi-bin/w3ml/sylpheed/msg/24233.
Indeed, you cannot rely on the locale encoding to convert mails that don't
specify encoding, since locale encoding is probably not right for each mail.
I have done a small patch against 2.0.0 adressing my own case (fallback to
iso8859-15). See attachment. This is not configurable, but corrects my
problem.
Regards,
Guillaume
PS : sylpheed will be perfect when it will have imap4 IDLE and subscribe
support ;)
--
Guillaume Castagnino
guilc@laposte.net / casta@xwing.info
GnuPG/PGP key :
http://wwwkeys.pgp.net:11371/pks/lookup?op=vindex&fingerprint=on&search=0x8AF468AF
Fingerprint : CD52 FE40 9592 BA1E E89D 5FB6 820E 4742 8AF4 68AF
["00000000.mimetmp" (text/plain)]
Hi,
I have a problem with mails that don't specify a codeset. There are many bad
clients that do this (such as outlook...) :
I use automatic codeset so those mails are converted with a
locale-encoding-to-UTF-8 conversion. BUT my locale is fr_FR.UTF-8, so those
mails are not converted at all !
Generally, such mails are us-ascii or iso-8859-*, not utf-8, so to see those
mails correctly, I must force encoding. This solution is not good, because
in this case, mime-encoding value is overidden on correctly encoded stuff, so
correctly encoded mails are not correctly displayed...
A configurable fallback encoding should be definitly a good thing as it was
already suggested here : http://www.tmtm.org/cgi-bin/w3ml/sylpheed/msg/24233.
Indeed, you cannot rely on the locale encoding to convert mails that don't
specify encoding, since locale encoding is probably not right for each mail.
I have done a small patch against 2.0.0 adressing my own case (fallback to
iso8859-15). See attachment. This is not configurable, but corrects my
problem.
Please, CC me to answer, I have not subscribed to the ML
Regards,
Guillaume
PS : sylpheed will be perfect when it will have imap4 IDLE and subscribe
support ;)
--
Guillaume Castagnino
guilc@laposte.net / casta@xwing.info
GnuPG/PGP key :
http://wwwkeys.pgp.net:11371/pks/lookup?op=vindex&fingerprint=on&search=0x8AF468AF
Fingerprint : CD52 FE40 9592 BA1E E89D 5FB6 820E 4742 8AF4 68AF
["fallback-mimetype.patch" (text/x-patch)]
--- src/procmime.c.old 2005-08-21 01:08:47.000000000 +0200
+++ src/procmime.c 2005-08-21 01:09:19.000000000 +0200
@@ -740,7 +740,8 @@
}
src_encoding = prefs_common.force_charset
- ? prefs_common.force_charset : mimeinfo->charset;
+ ? prefs_common.force_charset : mimeinfo->charset
+ ? mimeinfo->charset : conv_get_charset_str((CharSet)C_ISO_8859_15);
if (mimeinfo->mime_type == MIME_TEXT) {
while (fgets(buf, sizeof(buf), tmpfp) != NULL) {
--- src/textview.c.old 2005-07-13 11:19:21.000000000 +0200
+++ src/textview.c 2005-08-21 01:09:16.000000000 +0200
@@ -425,7 +425,7 @@
GtkTextMark *mark;
GtkTextIter iter;
FILE *fp;
- const gchar *charset = NULL;
+ const gchar *charset = conv_get_charset_str((CharSet)C_ISO_8859_15);
GPtrArray *headers = NULL;
buffer = gtk_text_view_get_buffer(text);
@@ -469,7 +469,7 @@
gchar buf[BUFFSIZE];
const gchar *boundary = NULL;
gint boundary_len = 0;
- const gchar *charset = NULL;
+ const gchar *charset = conv_get_charset_str((CharSet)C_ISO_8859_15);
GPtrArray *headers = NULL;
gboolean is_rfc822_part = FALSE;
@@ -572,7 +572,7 @@
gchar buf[BUFFSIZE];
const gchar *boundary = NULL;
gint boundary_len = 0;
- const gchar *charset = NULL;
+ const gchar *charset = conv_get_charset_str((CharSet)C_ISO_8859_15);
GPtrArray *headers = NULL;
g_return_if_fail(mimeinfo != NULL);
[Attachment #7 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic