Please check the code below. It will be able to read the GBK input from STDIN and convert it to UTF-8 to STDOUT. :)
#!/usr/bin/perl -W
use encoding "gbk", STDOUT => "utf8";
while(<>){print};
Power and Simple. :D
#!/usr/bin/perl -W
use encoding "gbk", STDOUT => "utf8";
while(<>){print};
@copyright of Sam Chadwick - https://thehub.thomsonreuters.com/groups/bitcoin/blog/2017/09/10/blockchain-paper Blockchain Papers A c...
1 条评论:
最近才看到, 其实还有更简单的方法:
perl -Mencoding=euc-cn,STDOUT,utf8 -pe1 < file.euc-cn > file.utf8
发表评论