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

Re: [perl #21874] Perl bug involving $1 and lc()

Thread Previous | Thread Next
Robert Spier
April 8, 2003 16:33
Re: [perl #21874] Perl bug involving $1 and lc()
Message ID:
Jon Rifkin (via RT) wrote
> Note the second output line, where there should be a '12345' there is
> instead a '0c0'.  This problem occurrs regardless of the input
> data unless the are blank lines, and the error always occurs on
> the second output line starting at the second column.


   I see you're using RH8.  This looks like a UTF8 Locale issue.  RedHat 
8 changed the default encoding to utf8.

  I can easily replicate this on my RH7.3 box when explicitly setting LANG.

  echo 0123456789 0123456789 | LANG=en_US.utf8 perl -lne 'print lc($1) 
while /(\d+)/g'

I believe this is smarter in perl5.8.1-to-be and 5.9.1-to-be.


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