Thread [Tk] File auswählen unicode (31 answers)
Opened by welle at 2013-11-01 20:07

Raubtier
 2013-11-05 20:27
#171802 #171802
User since
2012-05-04
1054 Artikel
BenutzerIn

user image
Ich habe mal eben in der Doku nachgeschaut. Da steht:

Quote
CAVEATS
Perl does not have a concept of encoded filesystems yet. This means that operations on filenames like "opendir" and "open" still use byte semantics. Tk however uses character semantics internally, which means that you can get filenames with the UTF-8 flag set in functions like "chooseDirectory", "getOpenFile" and similar. It's the user's responsibility to determine the encoding of the underlying filesystem and convert the result into bytes, e.g.

Code (perl): (dl )
1
2
3
4
5
           use Encode;
           ...
           my $dir = $mw->chooseDirectory;
           $dir = encode("windows-1252", $dir);
           opendir DIR, $dir or die $!;



Es ist also normal, dass man konvertieren muss. Nach deiner letzten Nachricht bin ich jetzt aber etwas ratlos, ob du das Problem noch hast oder ob alles geht.

View full thread [Tk] File auswählen unicode