in reply to Tk and Non-ASCII File Names

The first thing that comes to my mind is that Perl uses UTF-8. Are you converting from from your localized character set into UTF-8 (or vice-versa)? I.e. you string in 'my $file', will be takes as a UTF-8 string, If you want a non UTF-8 string, maybe (untested):
{ use locale; my $file== '06_Protection_de_la_tête.xml'; }
Man page 'perllocale' for more info on this topic...

Replies are listed 'Best First'.
Re^2: Tk and Non-ASCII File Names
by eff_i_g (Curate) on Sep 27, 2010 at 18:33 UTC
    Diddler,

    This sample is part of a larger program. I'm using File::Find::Rule to retrieve file names and then I incorporate them into commands and pass them through Tk::ExecuteCommand.

    I found this bug, but whatever I do (locale, encode, decode, utf8::upgrade, utf8::downgrade) doesn't work.

    I made a temporary library, copied Tk::ExecuteCommand into it, added utf8::downgrade to the command, and this works! Now I'm wondering if it's possible to get it working without changing the module or if it's wise to change the module itself.