墙有缝,壁有耳

Shutter中文乱码问题

Ubuntu 16.04.1 LTS 64bit
Shutter 0.93.1

1、菜单乱码

将$win->get_name进行UTF-8解码
修改脚本文件:

sudo vim /usr/bin/shutter

第8627行

my $window_item = Gtk2::ImageMenuItem->new_with_label( $win->get_name );

修改为

my $window_item = Gtk2::ImageMenuItem->new_with_label( $shf->utf8_decode($win->get_name) );

2、提示文字乱码

修改文件:

sudo vim /usr/share/perl5/Shutter/Screenshot/Window.pm

第108~111行

print $self->{_c}{'cw'}{'window'}->get_name, "\n" if $self->{_sc}->get_debug;

my $text = Glib::Markup::escape_text ($self->{_c}{'cw'}{'window'}->get_name);
utf8::decode $text;

修改为:

my $text = $self->{_c}{'cw'}{'window'}->get_name;
utf8::decode $text;

print $text, "\n" if $self->{_sc}->get_debug;
$text = Glib::Markup::escape_text ($text);

发表评论

电子邮件地址不会被公开, * 为必填项,必须包含中文,不能提交URL。