develooper Front page | perl.perl5.porters | Postings from June 2003

Re: [perl #22203] unicode regular expressions not working correctly

Thread Previous
Andreas J Koenig
June 24, 2003 02:51
Re: [perl #22203] unicode regular expressions not working correctly
Message ID:
" (via RT)" <> writes:

> # New Ticket Created by 
> # Please include the string:  [perl #22203]
> # in the subject line of all future correspondence about this issue. 
> # <URL: >
> This is a bug report for perl from,
> generated with the help of perlbug 1.34 running under perl v5.8.0.
> -----------------------------------------------------------------
> [Please enter your report here]
> Please note, this message has UTF-8 characters. Hopefully perlbug
> handles that correctly.

I'll leave all highbit stuff out of the reply to make it easier on all
involved parties.

> The following test program:
>    #!/usr/bin/perl -w
>    my @strings = [...highbit stuff omitted...]

If your script contains literal UTF-8, then you *must* tell perl about
that with the utf8 pragma. When I change your script to start with

    use utf8;

then I see no problem.

If you still see the bug when you add the utf8 pragma, please let us
know. It would probably help then, if you could comment a little which
UTF-8 strings you actually include in your script. Maybe the message
was not transported correctly. Maybe you can reproduce the problem in
a script without actually using high bits?

>     LANG=en_US.UTF-8

Maybe your observation also is related to your environment. In case
you still have troubles, please try to set LANG to "C" or some other
value that doesn't match /utf-8/i.

Thanks for your report,

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About