以下代码演示了我的问题。运行它会给我一个错误消息,上面写着:“UCS-2LE:code point "\x{20541}" too high at C:/Perl/site/lib/Tk/Widget.pm line 205. at E:\test。请在第 9 行"。
我的 Tk 版本是 804.028,我在 WinXP(简体中文版)上运行 ActivePerl 10.0.0。
有谁知道是否有办法解决它?一如既往地感谢:)
use strict;use warnings;
use utf8;
use Tk;
my $mw = MainWindow->new;
my $text = ""; #A Chinese character
eval{
$mw->Label(-text => $text)->pack;
};
warn $@ if $@;
MainLoop;