summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-12-29 21:54:42 -0700
committerKarl Williamson <public@khwilliamson.com>2011-12-30 11:08:28 -0700
commitc887f93f9d03c5d125f319a4322e94615be456d9 (patch)
tree00d914662444ffb75828cbac7252a317bdd34c9d /lib
parentc2ca0207a488363c6784d9447b54fa4df29a14a5 (diff)
downloadperl-c887f93f9d03c5d125f319a4322e94615be456d9.tar.gz
Unicode::UCD: Allow prop_invmap() to work on non-compact binary properties
It may be that the tables input to prop_invmap() are not in the most compact form. There was a problem coping with these on binary properties; which this commit fixes by realizing that a binary property omits its 'Y' property value. The .t does not pass these tests when the input is not compact, though.
Diffstat (limited to 'lib')
-rw-r--r--lib/Unicode/UCD.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm
index b5d57e5791..db95111947 100644
--- a/lib/Unicode/UCD.pm
+++ b/lib/Unicode/UCD.pm
@@ -2818,7 +2818,10 @@ RETRY:
# We now see that it should be
# 12 => XYZ
# 18 => $missing
- if (@invlist > 1 && $invmap[-2] eq $map) {
+ if (@invlist > 1 && ( (defined $map)
+ ? $invmap[-2] eq $map
+ : $invmap[-2] eq 'Y'))
+ {
$invlist[-1] = $end + 1;
next;
}