413. Re: Unicode in Perl


番号順一覧Top スレッド順一覧Top
作者: Bruce.
日時: 2004/7/10(02:04)
Bruce. です。

その後いろいろといじってみたのですが、


use encoding sjis;
#binmode(STDIN, ":encoding(sjis)");
while (<>) {
   chomp;
   print $_,"\n" if /\p{InBasicLatin}+/;
}


↑を use encodingの行をコメントアウトして、binmodeを活かすと
期待通りの動作をします。両方活かすと二重にデコードしてしまうようで
まともに動きません。わけわからん。

-- 
木村浩一
  I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
  mail kbk@...
  web  www.kt.rim.or.jp/~kbk/
前の発言: 412. Re: Unicode in Perl [Bruce.] 2004/7/10(00:28)
後の発言: 414. Re: Unicode in Perl [藤岡和夫] 2004/7/12(23:16)
親発言: 410. Unicode in Perl [Bruce.] 2004/7/09(19:16)
子発言: