use utf8; works with the code given; however, when I incorporate it into the larger program it does not work. I'm mimicking that in the posted script by replacing
withmy $file = '06_Protection_de_la_tête.xml';
use File::Find::Rule; my @files = File::Find::Rule->file->name('*.xml')->in('.'); my $file = shift @files;
If I follow this with
then all of the non-Tk lines break:use Encode; my $file = decode('utf8', $file)
Argh!06_Protection_de_la_t�te.xml: No such file or directory
Do you suspect this to be Tk-related since the other commands work fine and there is an open bug related to this matter? Tk::ExecuteCommand builds the command by appending to the command I pass:
$self->{-command} . ' 2>&1 |'Could this concatenation be changing the internal encoding of the string no matter what I send to the module? As I noted in my other reply, I can get all of this working if I modify a copy of the module and use utf8::downgrade, but I don't know if it's wise to change the one in production.
In reply to Re^2: Tk and Non-ASCII File Names
by eff_i_g
in thread Tk and Non-ASCII File Names
by eff_i_g
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |