06/11/06 19:07:50
この板の趣旨とは、ちょっと内容がずれてますが、教えて下さい。
shell-command-to-string 関数を使って、perl を呼び出そうとしていますが、
日本語引数を渡すとどこの段階でか分かりませんが、文字がばけます。
(shell-command-to-string "c:/Perl/bin/perl.exe e:/work/0my/scripts/test.pl てすと表示")
で、「test.pl」 では、
my $outfile = "e:/work/0my/scripts/test.txt";
my $out;
open ($out, "> $outfile") || die ("couldn't open $outfile to write into.");
print ($out $ARGV [0]);
close($out);
で、"test.txt" を shift_jis とかで開いても化けています。
DOS 上で日本語引数は、問題なく処理されるので、Elisp から、
perl に渡されるときに壊れると解釈していますが、どうすればいいのでしょう?