Re: Question and possibly bugs about string encoding in gtk-perl
- From: Dominique Dumont <domi dumont free fr>
- To: gtk-perl-list gnome org
- Cc: Torsten Schönfeld <kaffeetisch gmx de>, 847051 bugs debian org, Boyuan Yang <073plan gmail com>
- Subject: Re: Question and possibly bugs about string encoding in gtk-perl
- Date: Sun, 18 Dec 2016 11:48:06 +0100
On Friday, 16 December 2016 21:34:55 CET Torsten Schönfeld wrote:
So it seems like the safest bet would be to try to decode the window
name from UTF8, and if that fails, try Encode::X11 and its
'x11-compound-text' (Hi Kevin!).
ok, that makes sense.
For the record, here's what I'm going to use:
my $raw_name = $win->get_name;
my $name;
eval { $name = decode( 'UTF-8' , $raw_name, 1); };
$name = decode( 'x11-compound-text', $raw_name ) if $@;
Many thanks for the help :-)
All the best
--
https://github.com/dod38fr/ -o- http://search.cpan.org/~ddumont/
http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]