Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
however, the same code, with LC_ALL=hu_HU.UTF-8 (and receiving an utf8-encoded 'é'), the first match fails. the second succeeds. if i remove the use locale in the second case, both match. why is this?# LC_ALL=hu_HU (the encoding for the locale is latin2) use open qw/:locale/; use locale; $a = <>; # read in eg: 'é' in latin2, converted correctly $a =~ m/\w/; $a =~ m/[\w]/; # both match
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use locale behavior depends on charset of locale?
by ikegami (Patriarch) on Jul 10, 2009 at 15:58 UTC | |
by ikegami (Patriarch) on Jul 10, 2009 at 16:02 UTC | |
by ig (Vicar) on Jul 10, 2009 at 17:04 UTC | |
by zwon (Abbot) on Jul 10, 2009 at 18:02 UTC | |
by ikegami (Patriarch) on Jul 10, 2009 at 18:35 UTC | |
|
Re: use locale behavior depends on charset of locale?
by Anonymous Monk on Jul 10, 2009 at 13:39 UTC |