Revision 2090 libsylph/procmime.c

procmime.c (revision 2090)
464 464

  
465 465
static MimeParams *procmime_parse_mime_parameter(const gchar *str)
466 466
{
467
	ConvADType ad_type;
468
	gchar *tmp = NULL;
467 469
	gchar *hvalue;
468 470
	gchar *param, *name, *value;
469 471
	gchar *charset = NULL, *lang = NULL;
......
489 491
	if (!p)
490 492
		return mparams;
491 493
	++p;
494

  
495
	/* workaround for raw-JIS filename (Eudora etc.) */
496
	ad_type = conv_get_autodetect_type();
497
	if ((ad_type == C_AD_JAPANESE ||
498
	     (ad_type == C_AD_BY_LOCALE && conv_is_ja_locale())) &&
499
	    strstr(p, "\033$") != NULL) {
500
		CodeConvFunc conv_func;
501
		conv_func = conv_get_code_conv_func(NULL, NULL);
502
		tmp = conv_func(p, NULL);
503
		p = tmp;
504
		debug_print("procmime_parse_mime_parameter(): raw-JIS header body detected: %s\n", str);
505
	}
506

  
492 507
	count = prev_count = -1;
493 508
	cont_name = cont_value = NULL;
494 509

  
......
662 677
	g_free(cont_value);
663 678
	g_free(lang);
664 679
	g_free(charset);
680
	if (tmp)
681
		g_free(tmp);
665 682

  
666 683
	plist = g_slist_reverse(plist);
667 684
	mparams->plist = plist;

Also available in: Unified diff