in reply to Re^2: Problem running shell command from Perl
in thread Problem running shell command from Perl
I have discovered that if the original filename does not contain unicode chars (ie all 7-bit ascii), my program can create an 8dot3 name. So the following works:
my $trans2 = `fsutil file setShortName \"C:\\Users\\James\\Music\\thewarrior16\" \"THEW~001\"`;
But if the filename contains unicode, the fsutil command fails. So the following does NOT work:
my $trans = `fsutil file setShortName \"C:\\Users\\James\\Music\\國語懷念老歌 Vol. 2\" \"Vol2~0UG\"`;
Is perl somehow mangling the unicode chars before it passes them to fsutil? There's got to be a simple solution to this. But then, considering what a mess perl's handling of unicode is, maybe not ...
Any more ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Problem running shell command from Perl
by harangzsolt33 (Deacon) on Jun 20, 2023 at 16:59 UTC | |
by CrashBlossom (Beadle) on Jun 20, 2023 at 18:59 UTC | |
by harangzsolt33 (Deacon) on Jun 20, 2023 at 19:12 UTC | |
by CrashBlossom (Beadle) on Jun 20, 2023 at 19:40 UTC |