diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-01 06:45:53 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-01 06:45:53 +0000 |
commit | 3bec356411ea30186c2876cb56cbf5d69845ed32 (patch) | |
tree | ea703e5487a8a500d4231f1d58a7d1441613a2ca /regcomp.c | |
parent | 78109b9e7880b756b1f4157b2eae0f83f070e89b (diff) | |
download | perl-3bec356411ea30186c2876cb56cbf5d69845ed32.tar.gz |
Get the three different space character classes right under utf8.
p4raw-id: //depot/perl@7940
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -3705,7 +3705,7 @@ S_regclassutf8(pTHX_ RExC_state_t *pRExC_state) flags |= ANYOF_FOLD; if (LOC) flags |= ANYOF_LOCALE; - listsv = newSVpvn("# comment\n",10); + listsv = newSVpvn("# comment\n", 10); } if (!SIZE_ONLY && ckWARN(WARN_REGEXP)) @@ -3868,15 +3868,16 @@ S_regclassutf8(pTHX_ RExC_state_t *pRExC_state) case ANYOF_NPUNCT: Perl_sv_catpvf(aTHX_ listsv, "!utf8::IsPunct\n"); break; case ANYOF_SPACE: - case ANYOF_PSXSPC: + Perl_sv_catpvf(aTHX_ listsv, "+utf8::IsSpacePerl\n");break; + case ANYOF_NSPACE: + Perl_sv_catpvf(aTHX_ listsv, "!utf8::IsSpacePerl\n");break; case ANYOF_BLANK: - /* Not very true for PSXSPC and BLANK - * but not feeling like creating IsPOSIXSpace and - * IsBlank right now. --jhi */ + Perl_sv_catpvf(aTHX_ listsv, "+utf8::IsBlank\n"); break; + case ANYOF_NBLANK: + Perl_sv_catpvf(aTHX_ listsv, "!utf8::IsBlank\n"); break; + case ANYOF_PSXSPC: Perl_sv_catpvf(aTHX_ listsv, "+utf8::IsSpace\n"); break; - case ANYOF_NSPACE: case ANYOF_NPSXSPC: - case ANYOF_NBLANK: Perl_sv_catpvf(aTHX_ listsv, "!utf8::IsSpace\n"); break; case ANYOF_UPPER: Perl_sv_catpvf(aTHX_ listsv, "+utf8::IsUpper\n"); break; |