in reply to Re^4: Strip utf-8 dangerous url chars
in thread Strip utf-8 dangerous url chars

what can be the problem ?

The problem is most likely that your data isn't what you think it is.

Try the following script:

use strict; use warnings; binmode STDOUT, ':encoding(UTF-8)'; use Encode qw/decode_utf8/; while (<>) { $_ = decode_utf8 $_; s/\W//g; print; }

Some in- and output:

möp spaß     # input
möpspaß      # output
АБВГ-ДЕЖ/ЗDD # input
АБВГДЕЖЗDD   # output

So it preserves both German umlauts and Cyrillic characters.

Please actually read the article I gave you a link to, it contains advice on how to debug such problems.