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
"use bytes" doesn't apply byte semantics to concatenation #7114
Comments
From @jlokierCreated by @jlokierThe "use bytes" pragma is useful for code which only wants to handle bytes. substr(), length(), index(), pos() and regex matching all ignore the However, string concatenation does not take this pragma into account. This is quite inconsistent with the algebraic properties expected of length(substr($a,0,1).substr($a,1)) == length($a) Here's an example program which illustrates this: $x="\x{100}abc"; The program prints: 5,4 Those numbers make no sense. In bytes, length($x) is 5 and length($y) (This also shows length($y) is modified simply by $y being read, Summary: I think string concatenation should _not_ upgrade non-UTF-8 Perl Info
|
From @rgsSADAHIRO Tomoyuki wrote:
Thanks, both patches applied to bleadperl as change #22363. |
The RT System itself - Status changed from 'new' to 'open' |
From dankogai@dan.co.jpOn Feb 23, 2004, at 01:26, Autrijus Tang wrote:
Sorry for my slow response. I was too busy to be online for last few I just checked the patch on both 5.8.0 and 5.8.3 and worked fine. So Pumpking(s), please go ahead apply his patch. Dan the Encode Maintainer |
p5p@spam.wizbit.be - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#26905 (status was 'resolved')
Searchable as RT26905$
The text was updated successfully, but these errors were encountered: