87C751 has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to apply a regex to lines from a textfile that include some international characters, all from within a CGI.pm-based web module. \xe9, for example, is an accented 'o'. But it just won't happen. If wrapped in eval, the error log says: "translateStrings.cgi: Unrecognized character \\xE9 at (eval 32) line 6, <fh00001strings.txt> line 6930." Without the eval, the script simply dies with no output (even from use CGI::Carp qw(fatalsToBrowser);). The int'l characters are in a position to be matched by ([^\n]+)\n (and I even tried (.*?)\n). No joy.
I'm sure there is a simple incantation I've missed that will make this work in 5.0.8. (oh, I forgot to mention... the problem doesn't show up with 5.0.6) Would one of you have a clue to spare?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re:
by wolv (Pilgrim) on Jun 16, 2004 at 16:47 UTC | |
|
Re: regex dies on international characters
by dave_the_m (Monsignor) on Jun 16, 2004 at 15:42 UTC |