G'day haukex,
"... (Update: and though tr/A-Za-z0-9._-//cd should be faster, the above module handles Unicode well, so that's why I'd still recommend that)
I wasn't aware that transliteration would have a problem with Unicode. Here's a quick test:
$ perl -Mutf8 -E '
my $s = " abc \t ©︎ αβ гдж سشص ᚠᚢᚸ ⎈ ☂ .png";
$s =~ tr/A-Za-z0-9._-//cd;
say $s;
'
abc.png
I'm using Perl v5.36; are there issues with earlier versions?
I tested with a fair selection of Unicode characters but, obviously, I can't reasonably test them all. Are there problems with Unicode characters I didn't test?
— Ken
In reply to Re^2: Removing unwanted chars from filename.
by kcott
in thread Removing unwanted chars from filename.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |