Subject: [ID
20000912.009] perlunicode.pod still mentions tr///CU
From: Nick Clark <nick@plum.flirble.org>
Date: Tue, 12 Sep 2000 22:50:14 +0100
Message-Id: <E13YxwU-000DDQ-00@plum.flirble.org>
Subject: Re: [ID
20000912.009] perlunicode.pod still mentions tr///CU
From: sthoenna@efn.org (Yitzchak Scott-Thoennes)
Date: Tue, 12 Sep 2000 21:38:48 -0700
Message-ID: <YTwv5gzkgmfL092yn@efn.org>
p4raw-id: //depot/perl@7069
/* 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
=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 *