diff options
-rw-r--r-- | op.h | 4 | ||||
-rw-r--r-- | pod/perlunicode.pod | 18 |
2 files changed, 5 insertions, 17 deletions
@@ -130,9 +130,7 @@ Deprecated. Use C<GIMME_V> instead. /* 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 diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod index c6866617a2..c9954d8e96 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -157,20 +157,10 @@ C<(?:\PM\pM*)>. =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 * |