in reply to untainting and locales and internationalisation
I believe the answer is to use the extended character classes (eg ":alnum:"), and to also say "use utf8" within your script.