1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00

Fix the charset tag for ISO locales. Thanks to

Matthias Andree <matthias.andree@web.de> for help with this patch and with
testing.  Bump PORTREVISION.

PR:	42825
This commit is contained in:
Joe Marcus Clarke 2002-09-17 02:54:53 +00:00
parent f1fb6c763c
commit 6420da7d1a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=66468
2 changed files with 31 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= pan
PORTVERSION= 0.11.4
PORTREVISION= 1
CATEGORIES= news gnome
MASTER_SITES= http://pan.rebelbase.com/download/releases/${PORTVERSION}/SOURCE/ \
http://pan.rebelbase.com/download/obsolete/${PORTVERSION}/SOURCE/ \

View File

@ -0,0 +1,30 @@
--- gmime/gmime-charset.c.orig Tue Dec 18 15:09:40 2001
+++ gmime/gmime-charset.c Mon Sep 16 22:48:48 2002
@@ -69,15 +69,23 @@
* 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++;
- /* ; 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));
+ 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;
+ }
+ locale_charset = g_strndup (codeset, strcspn(codeset, "@;/"));
+ if (tmp != NULL) g_free(tmp);
g_strdown (locale_charset);
} else {
/* charset unknown */