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

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

Thread Previous
From:
Andreas J Koenig
Date:
June 24, 2003 02:51
Subject:
Re: [perl #22203] unicode regular expressions not working correctly
Message ID:
871xxjn6r0.fsf@franz.ak.mind.de
"nlevitt@columbia.edu (via RT)" <perlbug-followup@perl.org> writes:

> # New Ticket Created by  nlevitt@columbia.edu 
> # Please include the string:  [perl #22203]
> # in the subject line of all future correspondence about this issue. 
> # <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=22203 >
>
>
>
> This is a bug report for perl from nlevitt@columbia.edu,
> 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,
-- 
andreas

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About