On Sun, May 04, 2025 at 10:58:11AM +0200, Marc Haber wrote:
Okay, so that is not an acceptable fix that can go quickly into trixie.

I'd need a suggestion for a simpler regexp that will work without libperl, that would be a short-term solution for trixie to fix the immediate pain.

Post-trixie, I'd like to have adduser use two regexps conditionally depending on whether libperl is installed.

I think with the help of the people at MiniDebconf Hamburg, I have come up with a possible solution.

It looks like the \p{L} and other Unicode character classes dont match anything if libperl is not installed. So we just extend the regexp to match explictly what would be in ISO-8859-x, yielding the kind of uncomfortable

commentre => qr/[-"_\.+!\$%&()\]\[;\/'’ 
A-Za-z0-9\x{a1}-\x{ac}\x{ae}-\x{ff}\p{L}\p{Nd}\p{Zs}]*/,

So this allows the safe special characters below 0x40, a regular space, the latin letters in both cases, digits, the high order characters that are different in any ISO-8859 charset (explicitly excluding the non-breaking space and soft hyphen), followed by the Unicode Letters, Unicode Digits and Unicode Whitespace.

So, on a system without full perl (and probably with a non UTF-8-locale), this will match most languages that have an ISO-8859 charset. In a full system, we have full Unicode support.

Would this help the installer?

Greetings
Marc

--
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

Reply via email to