lib/unicode/Is/BidiRLO.pl Unicode character database
lib/unicode/Is/BidiS.pl Unicode character database
lib/unicode/Is/BidiWS.pl Unicode character database
+lib/unicode/Is/Blank.pl Unicode character database
lib/unicode/Is/C.pl Unicode character database
lib/unicode/Is/Cc.pl Unicode character database
lib/unicode/Is/Cf.pl Unicode character database
lib/unicode/Is/Sm.pl Unicode character database
lib/unicode/Is/So.pl Unicode character database
lib/unicode/Is/Space.pl Unicode character database
+lib/unicode/Is/SpacePerl.pl Unicode character database
lib/unicode/Is/SylA.pl Unicode character database
lib/unicode/Is/SylAA.pl Unicode character database
lib/unicode/Is/SylAAI.pl Unicode character database
--- /dev/null
+# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+# This file is built by mktables.PL from e.g. Unicode.301.
+# Any changes made here will be lost!
+return <<'END';
+0009
+0020
+00a0
+1680
+2000 200b
+202f
+3000
+END
--- /dev/null
+# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+# This file is built by mktables.PL from e.g. Unicode.301.
+# Any changes made here will be lost!
+return <<'END';
+0009 000a
+000c 000d
+0020
+00a0
+1680
+2000 200b
+2028 2029
+202f
+3000
+END
# 000B: VERTICAL TABULATION
# 000C: FORM FEED
# 000D: CARRIAGE RETURN
+ # 0020: SPACE
['IsSpace', '$cat =~ /^Z/ ||
$code =~ /^(0009|000A|000B|000C|000D)$/', ''],
+ ['IsSpacePerl',
+ '$cat =~ /^Z/ ||
+ $code =~ /^(0009|000A|000C|000D)$/', ''],
+ ['IsBlank', '$cat =~ /^Z[^lp]$/ || $code eq "0009"', ''],
['IsDigit', '$cat =~ /^Nd$/', ''],
['IsUpper', '$cat =~ /^L[ut]$/', ''],
['IsLower', '$cat =~ /^Ll$/', ''],
matches zero, one, any alphabetic character, and the percentage sign.
If the C<utf8> pragma is used, the following equivalences to Unicode
-\p{} constructs hold:
+\p{} constructs and equivalent backslash character classes (if available),
+will hold:
alpha IsAlpha
alnum IsAlnum
ascii IsASCII
blank IsSpace
cntrl IsCntrl
- digit IsDigit
+ digit IsDigit \d
graph IsGraph
lower IsLower
print IsPrint
punct IsPunct
space IsSpace
+ IsSpacePerl \s
upper IsUpper
word IsWord
xdigit IsXDigit
flags |= ANYOF_FOLD;
if (LOC)
flags |= ANYOF_LOCALE;
- listsv = newSVpvn("# comment\n",10);
+ listsv = newSVpvn("# comment\n", 10);
}
if (!SIZE_ONLY && ckWARN(WARN_REGEXP))
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;
(ANYOF_CLASS_TEST(p, ANYOF_NXDIGIT) && !isXDIGIT(c)) ||
(ANYOF_CLASS_TEST(p, ANYOF_PSXSPC) && isPSXSPC(c)) ||
(ANYOF_CLASS_TEST(p, ANYOF_NPSXSPC) && !isPSXSPC(c)) ||
- (ANYOF_CLASS_TEST(p, ANYOF_BLANK) && isBLANK(c)) ||
+ (ANYOF_CLASS_TEST(p, ANYOF_BLANK) && isBLANK(c)) ||
(ANYOF_CLASS_TEST(p, ANYOF_NBLANK) && !isBLANK(c))
) /* How's that for a conditional? */
{
my @space2 = sort grep { $space{$_} =~ /[[:blank:]]/ } keys %space;
print "not " unless "@space0" eq "cr ff lf spc tab";
-print "ok $test\n";
+print "ok $test # @space0\n";
$test++;
print "not " unless "@space1" eq "cr ff lf spc tab vt";
-print "ok $test\n";
+print "ok $test # @space1\n";
$test++;
print "not " unless "@space2" eq "spc tab";
-print "ok $test\n";
+print "ok $test # @space2\n";
$test++;
# bugid 20001021.005 - this caused a SEGV
if (!is_utf8_char(p))
return FALSE;
if (!PL_utf8_space)
- PL_utf8_space = swash_init("utf8", "IsSpace", &PL_sv_undef, 0, 0);
+ PL_utf8_space = swash_init("utf8", "IsSpacePerl", &PL_sv_undef, 0, 0);
return swash_fetch(PL_utf8_space, p);
}