char * cptmp = NULL;  StrAllocCopy(cptmp, (value + 6)); cptmp[0] = 'c'; cptmp[1] = 'p'; LYhndl = UCGetLYhndl_byMIME(cptmp); FREE(cptmp); return LYhndl;
return getLYhndl_byCP("cp", value + 8);
PUBLIC int UCGetLYhndl_byMIME ARGS1(	CONST char *,	value){    int i;    int LYhndl = -1;    if (!value || !(*value)) {	CTRACE(tfp, "UCGetLYhndl_byMIME: NULL argument instead of MIME name.\n");	return -1;    }    for (i = 0;	 (i < MAXCHARSETS && i < LYNumCharsets &&	  LYchar_set_names[i]); i++) {	if (LYCharSet_UC[i].MIMEname &&	   !strcasecomp(value, LYCharSet_UC[i].MIMEname)) {	    return i;	}    }    /*     * Not yet found, try synonyms.  - FM     */    if (!strcasecomp(value, "unicode-1-1-utf-8") ||	!strcasecomp(value, "utf8")) {	/*	 * Treat these as synonyms for the IANA registered name.  - FM	 */	return UCGetLYhndl_byMIME("utf-8");    }    if (!strncasecomp(value, "iso-2022-jp", 11) ||	!strcasecomp(value, "x-euc-jp")) {	return UCGetLYhndl_byMIME("euc-jp");    }    if (!strcasecomp(value, "x-shift-jis")) {	return UCGetLYhndl_byMIME("shift_jis");    }    if (!strcasecomp(value, "iso-2022-kr")) {	return UCGetLYhndl_byMIME("euc-kr");    }    if (!strcasecomp(value, "gb2312") ||	!strncasecomp(value, "cn-gb", 5) ||	!strcasecomp(value, "iso-2022-cn")) {	return UCGetLYhndl_byMIME("euc-cn");    }    if (!strcasecomp(value, "cn-big5")) {	return UCGetLYhndl_byMIME("big5");    }    if (!strcasecomp(value, "x-mac-roman") ||	!strcasecomp(value, "mac-roman")) {	return UCGetLYhndl_byMIME("macintosh");    }    if (!strcasecomp(value, "x-next") ||	!strcasecomp(value, "nextstep") ||	!strcasecomp(value, "x-nextstep")) {	return UCGetLYhndl_byMIME("next");    }    if (!strcasecomp(value, "iso-8859-1-windows-3.1-latin-1") ||	!strcasecomp(value, "cp1252") ||	!strcasecomp(value, "cp-1252") ||	!strcasecomp(value, "ibm1252") ||	!strcasecomp(value, "iso-8859-1-windows-3.0-latin-1")) {	/*	 * Treat these as synonyms for windows-1252, which is more	 * commonly used than the IANA registered name.  - FM	 */	return UCGetLYhndl_byMIME("windows-1252");    }    if (!strcasecomp(value, "iso-8859-2-windows-latin-2") ||	!strcasecomp(value, "cp1250") ||	!strcasecomp(value, "cp-1250") ||	!strcasecomp(value, "ibm1250")) {	/*	 * Treat these as synonyms for windows-1250.  - FM	 */	return UCGetLYhndl_byMIME("windows-1250");    }    if ((!strncasecomp(value, "ibm", 3) ||	 !strncasecomp(value, "cp-", 3)) &&	isdigit((unsigned char)value[3]) &&	isdigit((unsigned char)value[4]) &&	isdigit((unsigned char)value[5])) {	/*	 * For "ibmNNN<...>" or "cp-NNN", try "cpNNN<...>"	 * if not yet found.  - KW & FM	 */	char * cptmp = NULL;	StrAllocCopy(cptmp, (value + 1));	cptmp[0] = 'c';	cptmp[1] = 'p';	if ((LYhndl = UCGetLYhndl_byMIME(cptmp)) >= 0) {	    FREE(cptmp);	    return LYhndl;	}	/*	 * Try windows-NNN<...> if not yet found.  - FM	 */	StrAllocCopy(cptmp, "windows-");	StrAllocCat(cptmp, (value + 3));	LYhndl = UCGetLYhndl_byMIME(cptmp);	FREE(cptmp);	return LYhndl;    }    if (!strncasecomp(value, "windows-", 8) &&	isdigit((unsigned char)value[8]) &&	isdigit((unsigned char)value[9]) &&	isdigit((unsigned char)value[10])) {	/*	 * For "windows-NNN<...>", try "cpNNN<...>" - FM	 */	char * cptmp = NULL;	StrAllocCopy(cptmp, (value + 6));	cptmp[0] = 'c';	cptmp[1] = 'p';	LYhndl = UCGetLYhndl_byMIME(cptmp);	FREE(cptmp);	return LYhndl;    }    if (!strcasecomp(value, "koi-8")) { /* accentsoft bugosity */      return UCGetLYhndl_byMIME("koi8-r");    }    /* no more synonyms if come here... */    CTRACE(tfp, "UCGetLYhndl_byMIME: unrecognized MIME name \"%s\"\n", value);    return -1;	/* returns -1 if no charset found by that MIME name */}