#b1.pl use strict; use utf8; $_="中文"; sub p{ my $_=shift; binmode STDOUT, ":encoding(gbk)"; print "$_\n"; } p($_); p($_); __END__ #### #b2.pl use strict; use utf8; $_="中文"; binmode STDOUT, ":encoding(gbk)"; print "$_\n"; #### binmode STDOUT, ":encoding(gbk)"; print "$_\n"; __END__ #### e:\home\pl>perl b1.pl perl b1.pl 中文 "\x{0590}" does not map to cp936. "\x{0384}" does not map to cp936. \x{0590}\x{0384} e:\home\pl>perl b2.pl perl b2.pl 中文 中文