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 85082 - x-unknown charset should use default charset value
x-unknown charset should use default charset value
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-0.12.0 betas
Other Linux
: Normal enhancement
: 0.12.0
Assigned To: Charles Kerr
Charles Kerr
Depends on:
Blocks:
 
 
Reported: 2002-06-12 21:14 UTC by Martin Tomasek
Modified: 2006-06-18 05:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Tomasek 2002-06-12 21:14:06 UTC
I tried to get rid of warnings about x-unknown charset and added simple
workaround into gmime.

x-unknown charset is used by pine, when user did'n set charset.
http://www.washington.edu/pine/tech-notes/low-level.html#char-set

I put there default charset which I need, it should use default charset
from pan instead.

I cc'ed this to fejj, it looks like he's author of gmime code. :-)

patch:
--- gmime-iconv.c.old   Tue May 14 05:24:12 2002                          
     
+++ gmime-iconv.c       Wed Jun 12 22:50:40 2002                          
     
@@ -323,6 +323,10 @@                                                      
     
                return (iconv_t) -1;                                      
     
        }                                                                 
     
                                                                          
     
+       //replace unknown charset with default                            
     
+       if (!strcasecmp(from, "X-UNKNOWN"))                               
     
+               from = "ISO-8859-2";                                      
         
+                                                                         
     
        from = g_mime_charset_name (from);                                
     
        to = g_mime_charset_name (to);                                    
     
        key = g_alloca (strlen (from) + strlen (to) + 2);
Comment 1 Jeffrey Stedfast 2002-06-12 22:11:46 UTC
yea, I'll look into fixing this when I get home tonight.

hmmm, I should talk to the bug master and see how to add a new module
to bugzilla.gnome.org for gmime.
Comment 2 Martin Tomasek 2002-06-12 22:29:18 UTC
this enhancement should depend on bug #84995
Comment 3 Jeffrey Stedfast 2002-06-12 22:37:52 UTC
well, not really because gmime is independant of Pan's preferences.
The code should be changed to say something along the lines of:

if (!strcasecmp (from, "x-unknown"))
   from = g_mime_charset_locale_name ();

possibly allowing the application to override the environment's locale
settings...
Comment 4 Jeffrey Stedfast 2002-06-13 04:53:23 UTC
this is now fixed in gmime
Comment 5 Charles Kerr 2002-06-13 12:26:50 UTC
and in pan