diff options
author | Aaron Crane <arc@cpan.org> | 2017-03-04 12:50:58 +0000 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-07-15 19:35:43 +0100 |
commit | 20ae58f7a9bbf84d043d6e90f5988b6e3ca4ee3d (patch) | |
tree | 9cc42614061f228b5e0ba9ff22dc8b79f096595d /pp.c | |
parent | 36f05cd79a2d07c67e7a1ce57cb3d0a1f632bee7 (diff) | |
download | perl-20ae58f7a9bbf84d043d6e90f5988b6e3ca4ee3d.tar.gz |
RT #130907: Fix the Unicode Bug in split " "
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -5742,6 +5742,7 @@ PP(pp_split) STRLEN len; const char *s = SvPV_const(sv, len); const bool do_utf8 = DO_UTF8(sv); + const bool in_uni_8_bit = IN_UNI_8_BIT; const char *strend = s + len; PMOP *pm = cPMOPx(PL_op); REGEXP *rx; @@ -5828,6 +5829,10 @@ PP(pp_split) while (s < strend && isSPACE_LC(*s)) s++; } + else if (in_uni_8_bit) { + while (s < strend && isSPACE_L1(*s)) + s++; + } else { while (s < strend && isSPACE(*s)) s++; @@ -5859,6 +5864,10 @@ PP(pp_split) { while (m < strend && !isSPACE_LC(*m)) ++m; + } + else if (in_uni_8_bit) { + while (m < strend && !isSPACE_L1(*m)) + ++m; } else { while (m < strend && !isSPACE(*m)) ++m; @@ -5893,6 +5902,10 @@ PP(pp_split) { while (s < strend && isSPACE_LC(*s)) ++s; + } + else if (in_uni_8_bit) { + while (s < strend && isSPACE_L1(*s)) + ++s; } else { while (s < strend && isSPACE(*s)) ++s; |