449 |
return(mb_convert_encoding($newvalue, "EUC-JP", "auto")); // parts |
return(mb_convert_encoding($newvalue, "EUC-JP", "auto")); // parts |
450 |
} else { |
} else { |
451 |
if (eregi('".*"',$value)) { // quoted-pair |
if (eregi('".*"',$value)) { // quoted-pair |
452 |
$newvalue=ereg_replace('(.*)"(.*)"(.*)','\1'.decode_quoted_pair('\\2').'\3',$value); |
$newvalue=ereg_replace('(.*)"(.*)"(.*)',"\\1"."\\2"."\\3",$value); |
453 |
return(mb_convert_encoding($newvalue, "EUC-JP", "auto")); |
return(mb_convert_encoding($newvalue, "EUC-JP", "auto")); |
454 |
} else { // there wasn't anything encoded, return the original string |
} else { // there wasn't anything encoded, return the original string |
455 |
return(mb_convert_encoding($value, "EUC-JP", "auto")); |
return(mb_convert_encoding($value, "EUC-JP", "auto")); |
458 |
} |
} |
459 |
|
|
460 |
function decode_quoted_pair($value) { |
function decode_quoted_pair($value) { |
461 |
return(ereg_replace('\\\\(.)','\1',$value)); |
return(ereg_replace('\\\\(.)',"\\1",$value)); |
462 |
} |
} |
463 |
|
|
464 |
function getTimestamp($value) { |
function getTimestamp($value) { |