-
-
Save MaximeD/1664630 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use utf8; | |
# Try with and without the folowing | |
binmode(STDOUT, ":utf8"); | |
use Cwd; | |
chdir $ARGV[0]; | |
print cwd() . "\n"; | |
print "Des caractères accentués !\n"; |
uncommented
kik@central ~/tmp/flash $ ./test.pl
Use of uninitialized value $ARGV[0] in chdir at ./test.pl line 9.
Use of chdir('') or chdir(undef) as chdir() is deprecated at ./test.pl line 9.
/home/kik
Des caractères accentués !
commented
kik@central ~/tmp/flash $ perl test.pl
Use of uninitialized value $ARGV[0] in chdir at test.pl line 9.
Use of chdir('') or chdir(undef) as chdir() is deprecated at test.pl line 9.
/home/kik
Des caractères accentués !
ah euh, faut ptet que j'utilise un nom de dossier avec caractère non ascii :P
(j'ai viré le chdir(), je vois pas bienc e qu'il foutait là)
uncommented
kik@central ~/tmp/flash/éàù $ ./test.pl
/home/kik/tmp/flash/éà ù
Des caractères accentués !
commented
kik@central ~/tmp/flash/éàù $ ./test.pl
/home/kik/tmp/flash/éàù
Des caractères accentués !
uncommented
./encoding_test.pl ~/Téléchargements
/home/max/Téléchargements
Des caractères accentués !
commented
encoding_test.pl ~/Téléchargements
/home/max/Téléchargements
Des caract�res accentu�s !