> On Wed, 26 Feb 2003 22:20:19 +0200, Jarkko Hietaniemi <[EMAIL PROTECTED]> said:
> A bug? Was seemingly broken still in 5.8.0, but 5.8.1-to-be seems
> to get this right. (I don't off-hand remember this particular kind
> of problem but there were some s/// fixes that might have helped.
Looks like we may have some sort of bug here -- compare:
# BAD:
$ perl-5.8.0 -e '$x = "\x{2019}\nk"; $x =~ s/\S\n\S/. ./; print "$x\n";'
Wide character in print at -e line 1.
รข <= this is how my latin1 xterm reacts to \x{2019}
k
# NOT BAD:
$ perl-5.8.0 -e '$x = "\x{2019}\nk"; $x =~ s/\S\s\S/. .
> Dear UTF-8 regular expression gurus:
>
> $ perl -e '$x = "\x{2019}\nk"; $x =~ s/(\S)\n(\S)/$1 $2/sg; print "$x\n";'
> '<= this denotes a \x{2019} followed by \n
> k
> $ perl -e '$x = "b\nk"; $x =~ s/(\S)\n(\S)/$1 $2/sg; print "$x\n";'
> b k
>
> Any idea, why the Unicode apostrophe is not ma
[EMAIL PROTECTED] said:
> $ perl -e '$x = "\x{2019}\nk"; $x =~ s/(\S)\n(\S)/$1 $2/sg; print "$x\n";'
> '<= this denotes a \x{2019} followed by \n
> k $ perl -e
>
> $ perl -e '$x = "b\nk"; $x =~ s/(\S)\n(\S)/$1 $2/sg; print "$x\n";'
> b k
>
> [snip]
>
> $ perl -e 'print (("\x{2019}" =~ /\S/)
Dear UTF-8 regular expression gurus:
$ perl -e '$x = "\x{2019}\nk"; $x =~ s/(\S)\n(\S)/$1 $2/sg; print "$x\n";'
'<= this denotes a \x{2019} followed by \n
k
$ perl -e '$x = "b\nk"; $x =~ s/(\S)\n(\S)/$1 $2/sg; print "$x\n";'
b k
Any idea, why the Unicode apostrophe is not matched by a \S in t