On 02/03/2008, Alexandre Jousset <[EMAIL PROTECTED]> wrote: > Hello list, > > I'm able tu "use encoding utf8" in a normal Perl program to correctly > match regexes like this : echo 'é' | perl -e 'use encoding "utf8";print > <> =~ /\w/' (in an utf8 terminal), but how could I achieve the same > result in a Catalyst application? Am I obliged to "use encoding" in > every module? Is there a way to do it globally? What is the right way to > do this? > > My goal is to check input from utf8 forms.
Make sure that your pattern and string are utf8 and you wont have problems and will get faster runtimes. All use encoding 'utf8' is doing in that example is forcing your input and code to be interpreted as utf8. You could easily do the same thing in many other ways in code. In fact its recommended you avoid use encoding at all. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/" _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
