X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=uip%2Fmhparse.c;h=dc8e380bf38fbad4c7531de3b15ffdef48c2d485;hb=2433122c20baccb10b70b49c04c6b0497b5b3b60;hp=cf264c6f2f433a5b3b934db6062364899cab473b;hpb=559039d546e7eb1d160c4e3bd3538845b645546e;p=mmh diff --git a/uip/mhparse.c b/uip/mhparse.c index cf264c6..dc8e380 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -963,9 +963,7 @@ InitGeneric(CT ct) static int InitText(CT ct) { - char buffer[BUFSIZ]; - char *chset = NULL; - char **ap, **ep, *cp; + char **ap, **ep; struct k2v *kv; struct text *t; CI ci = &ct->c_ctinfo; @@ -992,10 +990,11 @@ InitText(CT ct) /* check if content specified a character set */ if (*ap) { + /* store its name */ + ct->c_charset = getcpy(norm_charmap(*ep)); /* match character set or set to CHARSET_UNKNOWN */ for (kv = Charset; kv->kv_key; kv++) { if (!mh_strcasecmp(*ep, kv->kv_key)) { - chset = *ep; break; } } @@ -1004,20 +1003,6 @@ InitText(CT ct) t->tx_charset = CHARSET_UNSPECIFIED; } - /* - ** If we can not handle character set natively, - ** then check profile for string to modify the - ** terminal or display method. - ** - ** termproc is for mhshow, though mhlist -debug prints it, too. - */ - if (chset != NULL && !check_charset(chset, strlen(chset))) { - snprintf(buffer, sizeof(buffer), "%s-charset-%s", - invo_name, chset); - if ((cp = context_find(buffer))) - ct->c_termproc = getcpy(cp); - } - return OK; }