455
457
sub get_charset_from_ct_line {
458
460
if ($type =~ /charset="([^"]+)"/i) { return $1; }
459
461
if ($type =~ /charset='([^']+)'/i) { return $1; }
460
462
if ($type =~ /charset=(\S+)/i) { return $1; }
464
466
# came up on the users@ list, look for multipart/alternative parts which