5
有沒有辦法使用Perl'..'操作符創建UTF-8字母數組?如何使用範圍運算符'..'創建utf-8字母表?
例如,這也不起作用:
$ cat t.pl
#!/usr/bin/perl
use Data::Dumper;
use encoding 'utf8';
print Dumper('А'..'Я'); # not working!
print Dumper('А','Б','В'); # ...works fine! but needs to be filling letter by letter
$ perl t.pl
$VAR1 = "\x{410}";
$VAR1 = "\x{410}";
$VAR2 = "\x{411}";
$VAR3 = "\x{412}";
$ echo $LANG
en_US.UTF-8
有什麼建議?
關於編碼雜注的建議:http://stackoverflow.com/q/492838#493508 – daxim 2011-03-05 20:49:34