vincentaxhe has asked for the wisdom of the Perl Monks concerning the following question:
I use Term::ReadLine, but It handle wide character(chinese) poorly, though the input is recognized correctly, is there a better module be able to deal wide character input, if just like type in a normal console
state $term = Term::ReadLine->new('note'); my $prompt = "LINE:"; chomp($note = $term->readline($prompt)); $note = decode 'UTF-8', $note; $term->addhistory($note) if $note =~ /\S/;
|
---|