Not for the first time, I am confused by a problem with utf8.

Checking with Devel::Peek, I see that paths returned by
Gtk3::FileChooserDialog are not marked as utf8, even those with special
characters such as รถ.

Is this a bug? Although I can't believe it, as it seems to play fine
with file test operations such as -w, -f, etc, unless if I first append
the path with a string operation, which then marks the string as utf8,
and seems to mangle it.

Indeed, the smallest patch for me which fixes the mangling is to mark
the filename as utf8 before appending it to it, and the unmark it
afterwards:

_utf8_on($filename);
$filename = "$filename$extension";
_utf8_off($filename);

But all of the documentation on utf8 in Perl says not to do that.

So what should I be doing when appending the extension?

Regards

Jeff

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to