Bug#1148708: rename: Renaming utf-8 character like – to - results in destroying all utf-8 characters in filename.

Pierre Bernhardt pierre at starcumulus.owl.de
Tue Sep 22 09:48:07 BST 2026


Package: rename
Version: 2.02-1
Severity: normal

Dear Maintainer,

I try to rename my files with
rename -n -v -E 's/[–]+/-/g'
rename(File-€-with-ℓ-and-–-to-File-€-with-ℓ-and--, File--��-with--�--and---to-File--��-with--�--and--)

rename -n -v -u -E 's/[–]+/-/g'
rename(File-€-with-ℓ-and-–-to-File-€-with-ℓ-and--, File--��-with--�--and---to-File--��-with--�--and--)

rename -n -v -u -E 's/[–]+/-/g' File-€-with-ℓ-and-–-to-File-€-with-ℓ-and-- |hexdump
0000000 6572 616e 656d 4628 6c69 2d65 82e2 2dac
0000010 6977 6874 e22d 9384 612d 646e e22d 9380
0000020 742d 2d6f 6946 656c e22d ac82 772d 7469
0000030 2d68 84e2 2d93 6e61 2d64 2c2d 4620 6c69
0000040 2d65 822d 2dac 6977 6874 2d2d 2d84 612d
0000050 646e 2d2d 742d 2d6f 6946 656c 2d2d ac82
0000060 772d 7469 2d68 842d 2d2d 6e61 2d64 292d
0000070 000a                                   0000071

rename -n -v -E 's/[–]+/-/g' File-€-with-ℓ-and-–-to-File-€-with-ℓ-and-- |hexdump
0000000 6572 616e 656d 4628 6c69 2d65 82e2 2dac
0000010 6977 6874 e22d 9384 612d 646e e22d 9380
0000020 742d 2d6f 6946 656c e22d ac82 772d 7469
0000030 2d68 84e2 2d93 6e61 2d64 2c2d 4620 6c69
0000040 2d65 822d 2dac 6977 6874 2d2d 2d84 612d
0000050 646e 2d2d 742d 2d6f 6946 656c 2d2d ac82
0000060 772d 7469 2d68 842d 2d2d 6e61 2d64 292d
0000070 000a                                   0000071

The hexdump looks identical so the -u flag allone has no different effect.

rename -n -v -u utf8 -E 's/[–]+/-/g' File-€-with-ℓ-and-–-to-File-€-with-ℓ-and-- File*

results in no output so maybe then the input name is already not matching?

By the way I also checked to rename ℓ to - with (nearby?) same result:
file-rename -n -v -u -E 's/[ℓ]+/-/g' File-€-with-ℓ-and-–-to-File-€-with-ℓ-and--
rename(File-€-with-ℓ-and-–-to-File-€-with-ℓ-and--, File--��-with---and--�--to-File--��-with---and--)


-- System Information:
Debian Release: 13.7
   APT prefers stable-updates
   APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.107+deb13-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages rename depends on:
ii  perl  5.40.1-6+deb13u1

rename recommends no packages.

rename suggests no packages.

-- no debconf information



More information about the pkg-perl-maintainers mailing list