diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-03-21 21:35:37 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-03-21 21:38:21 -0600 |
commit | 0541896b6b4bb098956cbbaa2551929aa5d83d1e (patch) | |
tree | 1cb91500c075bf6e2cb00258709ec3e998e55603 /pod/perlunicode.pod | |
parent | 81b6403efb14bcb2ad83ce521ef54aa7e65a197c (diff) | |
download | perl-0541896b6b4bb098956cbbaa2551929aa5d83d1e.tar.gz |
perlunicode: mention new Unicode::Casing
Diffstat (limited to 'pod/perlunicode.pod')
-rw-r--r-- | pod/perlunicode.pod | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod index 15f27f1ea4..a67e7f7329 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -908,7 +908,12 @@ would be intersecting with nothing (resulting in an empty set). =head2 User-Defined Case Mappings (for serious hackers only) -You can also define your own mappings to be used in C<lc()>, +B<This featured is deprecated and is scheduled to be removed in Perl +5.16.> +The CPAN module L<Unicode::Casings> provides better functionality +without the drawbacks described below. + +You can define your own mappings to be used in C<lc()>, C<lcfirst()>, C<uc()>, and C<ucfirst()> (or their string-inlined versions, C<\L>, C<\l>, C<\U>, and C<\u>). The mappings are currently only valid on strings encoded in UTF-8, but see below for a partial workaround for @@ -1025,7 +1030,8 @@ in the ToLower example, and in the ToUpper example, use A big caveat to the above trick, and to this whole mechanism in general, is that they work only on strings encoded in UTF-8. You can partially -get around this by using C<use subs>. For example: +get around this by using C<use subs>. (But better to just convert to +use L<Unicode::Casing>.) For example: use subs qw(uc ucfirst lc lcfirst); @@ -1072,7 +1078,7 @@ The C<lc()> example shows how you can add context-dependent casing. Note that context-dependent casing suffers from the problem that the string passed to the casing function may not have sufficient context to make the proper choice. And, it will not be called for C<\l>, C<\L>, C<\u>, -and C<\U>. +and C<\U>. (Again, use L<Unicode::Casing> instead.) =head2 Character Encodings for Input and Output |