summaryrefslogtreecommitdiff
path: root/lib
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 /lib
parent78109b9e7880b756b1f4157b2eae0f83f070e89b (diff)
downloadperl-3bec356411ea30186c2876cb56cbf5d69845ed32.tar.gz
Get the three different space character classes right under utf8.
p4raw-id: //depot/perl@7940
Diffstat (limited to 'lib')
-rw-r--r--lib/unicode/Is/Blank.pl12
-rw-r--r--lib/unicode/Is/SpacePerl.pl14
-rwxr-xr-xlib/unicode/mktables.PL5
3 files changed, 31 insertions, 0 deletions
diff --git a/lib/unicode/Is/Blank.pl b/lib/unicode/Is/Blank.pl
new file mode 100644
index 0000000000..86429218e3
--- /dev/null
+++ b/lib/unicode/Is/Blank.pl
@@ -0,0 +1,12 @@
+# !!!!!!! 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
diff --git a/lib/unicode/Is/SpacePerl.pl b/lib/unicode/Is/SpacePerl.pl
new file mode 100644
index 0000000000..2bb74dea8a
--- /dev/null
+++ b/lib/unicode/Is/SpacePerl.pl
@@ -0,0 +1,14 @@
+# !!!!!!! 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
diff --git a/lib/unicode/mktables.PL b/lib/unicode/mktables.PL
index d8b57b6a83..82b35ef97d 100755
--- a/lib/unicode/mktables.PL
+++ b/lib/unicode/mktables.PL
@@ -25,8 +25,13 @@ mkdir "To", 0755;
# 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$/', ''],