Shutter 中文乱码问题

警告
本文最后更新于 2016-09-25,文中内容可能已过时。

Ubuntu 16.04.1 LTS 64bit
Shutter 0.93.1

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

1
sudo vim /usr/bin/shutter

第 8627 行

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

修改为

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

修改文件:

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

第 108~111 行

1
2
3
4
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);
utf8mb4::decode $text;

修改为:

1
2
3
4
5
my $text = $self->{_c}{'cw'}{'window'}->get_name;
utf8mb4::decode $text;

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