跳过正文
  1. Blogs/

Shutter 中文乱码问题

·102 字·1 分钟· ·
代码 Shutter-Chinese-Garbled 中文 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->utf8mb4_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);
utf8mb4::decode $text;

修改为:

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);

相关文章

ubuntu wps 不能输入中文解决
·90 字·1 分钟
代码 Ubuntu-Wps-Cant-Input-Chinese Ubuntu Linux Wps 中文
Destination Host Prohibited
·136 字·1 分钟
代码 Destination-Host-Prohibited Ubuntu Ssl Iptables Ufw Destination
Ubuntu 源 香港中文大学
·39 字·1 分钟
代码 Ubuntu-Source-in-Hong-Kong Ubuntu 香港 更新源

加载Giscus评论,或者