From: Jarkko Hietaniemi Date: Thu, 14 Sep 2000 14:16:27 +0000 (+0000) Subject: Remove vestiges of tr//CU. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=383e7cdd17eec132ddb7b17dd6275f3153cbe989;hp=2c674647e4cd32dc05dd268c2de5090815265695;p=p5sagit%2Fp5-mst-13.2.git Remove vestiges of tr//CU. Subject: [ID 20000912.009] perlunicode.pod still mentions tr///CU From: Nick Clark Date: Tue, 12 Sep 2000 22:50:14 +0100 Message-Id: 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: p4raw-id: //depot/perl@7069 --- diff --git a/op.h b/op.h index 110fbef..55b85a5 100644 --- a/op.h +++ b/op.h @@ -130,9 +130,7 @@ Deprecated. Use C 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 c686661..c9954d8 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -157,20 +157,10 @@ C<(?:\PM\pM*)>. =item * -The C 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 doesn't take /U or /C (yet?). +The C operator translates characters instead of bytes. Note +that the C functionality has been removed, as the interface +was a mistake. For similar functionality see pack('U0', ...) and +pack('C0', ...). =item *