Wednesday, February 14, 2007

UTF7-IMAP to BIG5

隨便寫來應急一下...
#!/usr/local/bin/php
<?php
if($argc<2) {
fprintf(STDOUT,
"Usage:\n\t %s utf7-imap-string [...]\n\n",
$argv[0]);
exit;
}
for($i=1; $i<$argc; $i++) {
fprintf(STDOUT, "%s\n",
mb_convert_encoding(trim($argv[$i]),
"BIG-5", "UTF7-IMAP"));
}
exit;
?>

No comments: