New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pos() function doesn't handle unicode well #9423
Comments
From mmaslano@redhat.comFunction pos() doesn't return correct values for unicode strings. In this case it could be solved 'use utf8'. But the problem is still in Perl Info
|
From @moritzMarcela Maslanova wrote:
I don't see the bug here. pos() returns byte values if you use the I don't see how that principle is violated in your example above. Or am I missing a subtle off-by-one error?
As a non-golfed version: for my $s ( "\t\x{010a}\x{010a}\t..\t", "\taa\t..\t" ) { Output: This looks a bit weird indeed. At least to me ;-)
|
The RT System itself - Status changed from 'new' to 'open' |
From @ikegamiOn Thu, Jul 17, 2008 at 6:42 AM, via RT Marcela Maslanova
A simpler test that demonstrates the problem violently:
ActivePerl 5.10.0. |
From @andk
> On Thu, Jul 17, 2008 at 6:42 AM, via RT Marcela Maslanova
> A simpler test that demonstrates the problem violently:
This bug has somehow disappeared in bleadperl just right at the same Change 33580 by nicholas@nicholas-saigo on 2008/03/26 21:05:20 The offset for pos is stored as bytes, and converted to (Unicode) I think the ticket can be closed. Thanks, |
@rgs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#57040 (status was 'resolved')
Searchable as RT57040$
The text was updated successfully, but these errors were encountered: