Date: Mon, 16 Sep 2002 15:50:04 -0700 (PDT) From: Matthias Andree <matthias.andree@stud.uni-dortmund.de> To: gnome@FreeBSD.org Subject: Re: ports/42825: Pan breaks MIME charset headers (FreeBSD specific) Message-ID: <200209162250.g8GMo4vW007185@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/42825; it has been noted by GNATS. From: Matthias Andree <matthias.andree@stud.uni-dortmund.de> To: Joe Marcus Clarke <marcus@FreeBSD.org> Cc: freebsd-gnats-submit@FreeBSD.org, matthias.andree@web.de Subject: Re: ports/42825: Pan breaks MIME charset headers (FreeBSD specific) Date: Tue, 17 Sep 2002 00:40:50 +0200 I hacked upon the previous patch and another one I was sent in private mail, and this one finally works for me: --- gmime/gmime-charset.c.orig Tue Dec 18 21:09:40 2001 +++ gmime/gmime-charset.c Tue Sep 17 00:34:46 2002 @@ -69,15 +69,25 @@ * codeset is a character set or encoding identifier like * ISO-8859-1 or UTF-8. */ - char *codeset, *p; + char *codeset, *tmp = NULL; codeset = strchr (locale, '.'); if (codeset) { codeset++; + if (strncasecmp(codeset, "iso", 3) == 0 && + strlen(codeset) > 3 && + strncasecmp(codeset, "iso-", 4) != 0) { + tmp = (char *)g_malloc(strlen(codeset) + 2); + strcpy(tmp, "iso"); + strcat(tmp, "-"); + strcat(tmp, (codeset + 3)); + codeset = tmp; + } + /* ; is a hack for debian systems and / is a hack for Solaris systems */ - for (p = codeset; *p && !strchr ("@;/", *p); p++); - locale_charset = g_strndup (codeset, (unsigned) (p - codeset)); + locale_charset = g_strndup (codeset, strcspn(codeset, "@;/")); + if (tmp) g_free(tmp); g_strdown (locale_charset); } else { /* charset unknown */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-gnome" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209162250.g8GMo4vW007185>