summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-01 06:45:53 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-01 06:45:53 +0000
commit3bec356411ea30186c2876cb56cbf5d69845ed32 (patch)
treeea703e5487a8a500d4231f1d58a7d1441613a2ca /regcomp.c
parent78109b9e7880b756b1f4157b2eae0f83f070e89b (diff)
downloadperl-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.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/regcomp.c b/regcomp.c
index 784e83e43b..3b4f481b1c 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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;