New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perlunicode.pod still mentions tr///CU #2619
Comments
From @nwc10Created by nick@bagpuss.unfortu.netman perlunicode says: · The `tr///' operator translates characters instead of 2000-08-01 perl v5.7.0 3 PERLUNICODE(1) Perl Programmers Reference Guide PERLUNICODE(1) while (<>) { Similarly you could translate your output with tr/\0-\x{ff}//UC; # utf8 to latin1 char No, `s///' doesn't take /U or /C (yet?). Cribbing the wording from perldelta.pod suggests the following patch. Nicholas Clark Inline Patch--- perlunicode.pod.orig Tue Aug 1 03:32:06 2000
+++ perlunicode.pod Tue Sep 12 22:37:20 2000
@@ -157,20 +157,9 @@
=item *
-The C<tr///> operator translates characters instead of bytes. It can also
-be forced to translate between 8-bit codes and UTF-8. For instance, if you
-know your input in Latin-1, you can say:
-
- while (<>) {
- tr/\0-\xff//CU; # latin1 char to utf8
- ...
- }
-
-Similarly you could translate your output with
-
- tr/\0-\x{ff}//UC; # utf8 to latin1 char
-
-No, C<s///> doesn't take /U or /C (yet?).
+The C<tr///> operator translates characters instead of bytes. Note that
+the C<tr///CU> functionality has been removed, as the interface was a
+mistake. For similar functionality see pack('U0', ...) and pack('C0', ...).
=item *
Perl Info
|
From @ysthIn article <E13YxwU-000DDQ-00@plum.flirble.org>,
Here's another, albeit in a comment: Inline Patch--- op.h.orig Sun Aug 13 12:35:24 2000
+++ op.h Tue Sep 12 21:41:12 2000
@@ -130,9 +130,7 @@
/* Private for OP_TRANS */
#define OPpTRANS_FROM_UTF 1
#define OPpTRANS_TO_UTF 2
-#define OPpTRANS_IDENTICAL 4
- /* When CU or UC, means straight latin-1 to utf-8 or vice versa */
- /* Otherwise, IDENTICAL means the right side is the same as the left */
+#define OPpTRANS_IDENTICAL 4 /* right side is same as left */
#define OPpTRANS_SQUASH 8
#define OPpTRANS_DELETE 16
#define OPpTRANS_COMPLEMENT 32
End of Patch. |
From @nwc10I've just checked perl5.6's perlop and it happily mentions tr///CU as if (except that I'm not convinced that the above is near to a good wording, hence Nicholas Clark |
From @gsarOn Thu, 14 Sep 2000 14:13:20 BST, Nicholas Clark wrote:
It shall be removed in 5.6.1. Larry/Camel-III say so. Speaking of 5.6.1, if folks can send me (not the list) recommendations I plan to put out a 5.6.1-trial1 "soon". Sarathy |
From [Unknown Contact. See original ticket]
FYI: the new Camel and Pockref intentionally mention them not at all, --tom |
From The RT System itselfwill be in 5.6.1 |
Migrated from rt.perl.org#4299 (status was 'resolved')
Searchable as RT4299$
The text was updated successfully, but these errors were encountered: