diff options
author | Karl Williamson <khw@cpan.org> | 2016-06-30 22:05:55 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-06-30 22:22:36 -0600 |
commit | 48791bf1d9612a84d71edc00af8610da1a6cf34b (patch) | |
tree | 38935030c6eeba3170b7d6396461ef46354d7d84 /lib/Unicode | |
parent | 7d7345cf4f14a683b78978462e37e75c5bccd5ed (diff) | |
download | perl-48791bf1d9612a84d71edc00af8610da1a6cf34b.tar.gz |
Change \p{foo} to mean \p{scx: foo}
when 'foo' is a script. Also update the pods correspondingly, and to
encourage scx property use.
See http://nntp.perl.org/group/perl.perl5.porters/237403
Diffstat (limited to 'lib/Unicode')
-rw-r--r-- | lib/Unicode/UCD.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Unicode/UCD.pm b/lib/Unicode/UCD.pm index 276e9f5d7e..990e86f414 100644 --- a/lib/Unicode/UCD.pm +++ b/lib/Unicode/UCD.pm @@ -338,7 +338,8 @@ See L</Blocks versus Scripts>. the script I<code> belongs to. The L</prop_value_aliases()> function can be used to get all the synonyms -of the script name. +of the script name. Note that this is the older "Script" property value, and +not the improved "Script_Extensions" value. See L</Blocks versus Scripts>. @@ -966,6 +967,10 @@ that it doesn't have scripts, this function returns C<"Unknown">. The L</prop_value_aliases()> function can be used to get all the synonyms of the script name. +Note that the Script_Extensions property is an improved version of the Script +property, and you should probably be using that instead, with the +L</charprop()> function. + If supplied with an argument that can't be a code point, charscript() tries to do the opposite and interpret the argument as a script name. The return value is a I<range set>: an anonymous array of arrays that contain @@ -1056,7 +1061,9 @@ names as the keys, and the code point ranges (see L</charscript()>) as the values. L<prop_invmap("script")|/prop_invmap()> can be used to get this same data in a -different type of data structure. +different type of data structure. Since the Script_Extensions property is an +improved version of the Script property, you should instead use +L<prop_invmap("scx")|/prop_invmap()>. L<C<prop_values("Script")>|/prop_values()> can be used to get all the known script names as a list, without the code point ranges. @@ -2468,7 +2475,7 @@ resolving the input property's name as is done for regular expressions. These are also specified in L<perluniprops|perluniprops/Properties accessible through \p{} and \P{}>. Examples of using the "property=value" form are: - say join ", ", prop_invlist("Script=Shavian"); + say join ", ", prop_invlist("Script_Extensions=Shavian"); prints: 66640, 66688 |