DEVTOOLS: Synchronize encoding for punycode in different tool modes

This commit is contained in:
Eugene Sandulenko 2021-07-27 17:29:15 +02:00
parent e6429a1213
commit 92517fc3f5
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -95,8 +95,8 @@ sub processIso($) {
if ($::opt_e) {
# make 0x81 an escape symbol
$dir =~ s/\x81/\x81\x81/g;
# escape non-printables, '/', "'" and '"'
$dir =~ s/([\x00-\x1f\/'"])/\x81@{[chr(ord($1) + 0x80)]}/g;
# escape non-printables, '/', '"' and ":"
$dir =~ s/([\x00-\x1f\/":])/\x81@{[chr(ord($1) + 0x80)]}/g;
if ($dir =~ /[\x80-\xff]/) {
$dir = encode_punycode $dir;