From: Gurusamy Sarathy Date: Thu, 9 Mar 2000 18:37:35 +0000 (+0000) Subject: tweak Unicode notes, other cleanups X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=21bad92165270edd85ff697c883b65506d5af626;p=p5sagit%2Fp5-mst-13.2.git tweak Unicode notes, other cleanups p4raw-id: //depot/perl@5629 --- diff --git a/Changes b/Changes index 3eb6f9e..8fb21a3 100644 --- a/Changes +++ b/Changes @@ -95,6 +95,117 @@ Version v5.6.0 -------------- ____________________________________________________________________________ +[ 5628] By: gsar on 2000/03/09 17:39:58 + Log: support binmode(F,":crlf") and use open IN => ":raw", OUT => ":crlf" + semantics; the pragma sets defaults for both open() and qx// + Branch: perl + ! doio.c dosish.h embed.h embed.pl epoc/epocish.h lib/open.pm + ! mpeix/mpeixish.h op.c op.h opcode.h opcode.pl os2/os2ish.h + ! perl.h perlapi.c plan9/plan9ish.h pod/perlfunc.pod pp.sym + ! pp_proto.h pp_sys.c proto.h sv.h vms/vmsish.h vos/vosish.h +____________________________________________________________________________ +[ 5627] By: gsar on 2000/03/09 12:54:08 + Log: avoid autoflushing behavior of fork/system/exec on Solaris (thanks + to fflush(NULL) bug) + Branch: perl + ! hints/solaris_2.sh pod/perldelta.pod +____________________________________________________________________________ +[ 5626] By: gsar on 2000/03/09 11:34:51 + Log: abort build on HP-UX if bundled non-ANSI compiler is detected + (from Dominic Dunlop ) + Branch: perl + ! hints/hpux.sh +____________________________________________________________________________ +[ 5625] By: gsar on 2000/03/09 11:17:07 + Log: patch from Larry to make -T filetest algorithm recognize utf8 as + "text" + Branch: perl + ! pp_sys.c +____________________________________________________________________________ +[ 5624] By: gsar on 2000/03/09 11:11:59 + Log: provide support for deleting actions etc. (from Ronald J Kimball + ) + Branch: perl + ! lib/perl5db.pl pod/perldebug.pod +____________________________________________________________________________ +[ 5623] By: gsar on 2000/03/09 06:39:21 + Log: new xsubpp keywords should be in all caps + Branch: perl + ! lib/ExtUtils/xsubpp +____________________________________________________________________________ +[ 5622] By: gsar on 2000/03/09 06:26:04 + Log: demand-load utf8.pm in swash routines + Branch: perl + ! op.c utf8.c +____________________________________________________________________________ +[ 5621] By: gsar on 2000/03/08 19:27:02 + Log: make Dump() call the XSUB implementation transparently (modified + version of patch suggested by David Boyce ) + Branch: perl + ! ext/Data/Dumper/Dumper.pm ext/Data/Dumper/Dumper.xs + ! pod/perldelta.pod +____________________________________________________________________________ +[ 5620] By: gsar on 2000/03/08 18:35:48 + Log: do FILE should not see outside lexicals (from Rick Delaney + ) + Branch: perl + ! op.c pp_ctl.c t/comp/require.t +____________________________________________________________________________ +[ 5619] By: gsar on 2000/03/08 18:04:45 + Log: abstract code for C into a Perl_load_module() + API function + Branch: perl + ! doio.c embed.h embed.pl global.sym objXSUB.h op.c op.h + ! perlapi.c pp_sys.c proto.h +____________________________________________________________________________ +[ 5618] By: jhi on 2000/03/08 18:03:30 + Log: Integrate with Sarathy. + Branch: cfgperl + +> lib/Pod/Plainer.pm + !> Changes MANIFEST dosish.h embedvar.h lib/Pod/InputObjects.pm + !> lib/Pod/Parser.pm makedef.pl op.c op.h perl.c perlapi.h + !> perlvars.h pod/perlop.pod pod/pod2latex.PL sv.c unixish.h + !> vms/vmsish.h +____________________________________________________________________________ +[ 5617] By: jhi on 2000/03/08 15:44:05 + Log: ICU todo fixes. + Branch: cfgperl + ! Todo-5.6 +____________________________________________________________________________ +[ 5616] By: jhi on 2000/03/08 14:30:40 + Log: Even more Todo. + Branch: cfgperl + ! Todo-5.6 +____________________________________________________________________________ +[ 5615] By: jhi on 2000/03/08 14:13:45 + Log: More Todo. + Branch: cfgperl + ! Todo-5.6 +____________________________________________________________________________ +[ 5614] By: jhi on 2000/03/08 13:50:53 + Log: wording changes + Branch: cfgperl + ! lib/Math/Complex.pm +____________________________________________________________________________ +[ 5613] By: gsar on 2000/03/08 12:51:35 + Log: clarify docs on return value from binding operators + Branch: perl + ! pod/perlop.pod +____________________________________________________________________________ +[ 5612] By: gsar on 2000/03/08 12:41:38 + Log: shore up pod2latex shortcomings, and a Pod::Parser fix (from + Robin Barker) + Branch: perl + + lib/Pod/Plainer.pm + ! MANIFEST lib/Pod/Parser.pm pod/pod2latex.PL +____________________________________________________________________________ +[ 5611] By: gsar on 2000/03/08 12:22:59 + Log: integrate cfgperl changes into mainline + Branch: perl + ! Changes + !> installperl lib/Math/Complex.pm pod/perldelta.pod + !> t/lib/complex.t vms/vmsish.h +____________________________________________________________________________ [ 5610] By: gsar on 2000/03/08 12:08:17 Log: add missing locks for op refcounts Branch: perl diff --git a/lib/bytes.pm b/lib/bytes.pm index ae7b5fb..f93d615 100644 --- a/lib/bytes.pm +++ b/lib/bytes.pm @@ -32,7 +32,7 @@ bytes - Perl pragma to force byte semantics rather than character semantics =head1 DESCRIPTION WARNING: The implementation of Unicode support in Perl is incomplete. -Expect sudden and unannounced changes! +See L for the exact details. The C pragma disables character semantics for the rest of the lexical scope in which it appears. C can be used to reverse diff --git a/lib/utf8.pm b/lib/utf8.pm index c362a1c..17ec37b 100644 --- a/lib/utf8.pm +++ b/lib/utf8.pm @@ -31,7 +31,7 @@ utf8 - Perl pragma to enable/disable UTF-8 in source code =head1 DESCRIPTION WARNING: The implementation of Unicode support in Perl is incomplete. -Expect sudden and unannounced changes! +See L for the exact details. The C pragma tells the Perl parser to allow UTF-8 in the program text in the current lexical scope. The C pragma diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 408b48c..a7a2279 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -132,7 +132,7 @@ Perl 5.004 deprecated the interpretation of C<$$1> and similar within interpolated strings to mean C<$$ . "1">, but still allowed it. -In Perl 5.6 and later, C<"$$1"> always means C<"${$1}">. +In Perl 5.6.0 and later, C<"$$1"> always means C<"${$1}">. =item delete(), values() and C<\(%h)> operate on aliases to values, not copies @@ -413,15 +413,18 @@ See INSTALL for complete details. =head2 Unicode and UTF-8 support -Perl can optionally use UTF-8 as its internal representation for character +WARNING: This is an experimental feature. Implementation details are +subject to change. + +Perl now uses UTF-8 as its internal representation for character strings. The C and C pragmas are used to control this support in the current lexical scope. See L, L and L for more information. =head2 Interpreter cloning, threads, and concurrency -WARNING: This is an experimental feature in a pre-alpha state. Use -at your own risk. +WARNING: This is an experimental feature. Implementation details are +subject to change. Perl 5.005_63 introduces the beginnings of support for running multiple interpreters concurrently in different threads. In conjunction with @@ -469,11 +472,10 @@ for details. =head2 Lvalue subroutines -WARNING: This is an experimental feature. +WARNING: This is an experimental feature. Details are subject to change. -change#4081 -[TODO - Ilya Zakharevich , -Tuomas Lukka )] +Subroutines can now return modifiable lvalues. +See L. =head2 "our" declarations @@ -552,9 +554,6 @@ automatically undef-ed. To use this feature, you need the WeakRef package from CPAN, which contains additional documentation. -change#3385, also need perlguts documentation -[TODO - Tuomas Lukka ] - =head2 File globbing implemented internally WARNING: This is currently an experimental feature. Interfaces and @@ -868,24 +867,18 @@ the C<:> is optional.) F and F have been updated to keep the attributes with the stubs they provide. See L. -=head2 Regular expression improvements - -change#2827,2373,2372,2365,1813,1800,4112,4158,4215,4301 -[TODO - Ilya Zakharevich ] - -=head2 Overloading improvements - -change#2150 -[TODO - Ilya Zakharevich ] - =head2 open() with more than two arguments -[TODO - Ilya Zakharevich ] +If open() is passed three arguments instead of two, the second arguments +is used as the mode and the third argument is taken to be the file name. +This is primarily useful for protecting against unintended magic behavior +of the traditional two-argument form. See L. =head2 Support for interpolating named characters -change#4052 -[TODO - Ilya Zakharevich ] +The new C<\N> escape interpolates named characters within strings. +For example, C<"Hi! \N{WHITE SMILING FACE}"> evaluates to a string +with a unicode smiley face at the end. =head2 C and C may be overridden @@ -1102,11 +1095,6 @@ subroutine was not found in the package. Such cases stopped later method lookups from progressing into base packages. This has been corrected. -=head2 Consistent numeric conversions - -change#3378,3318 -[TODO - Ilya Zakharevich ] - =head2 Taint failures under C<-U> When running in unsafe mode, taint violations could sometimes @@ -1167,16 +1155,6 @@ Certain operations in the RHS of assignment statements have been optimized to directly set the lexical variable on the LHS, eliminating redundant copying overheads. -=head2 Faster mechanism to invoke XSUBs - -change#4044,4125 -[TODO - Ilya Zakharevich ] - -=head2 Perl_malloc() improvements - -change#4237 -[TODO - Ilya Zakharevich ] - =head2 Faster subroutine calls Minor changes in how subroutine calls are handled internally @@ -1237,10 +1215,6 @@ This port is still using its own builtin globbing. =back -=head2 OS/2 - -[TODO - Ilya Zakharevich ] - =head2 OS390 (OpenEdition MVS) Support for this EBCDIC platform has not been renewed in this release. @@ -1280,8 +1254,8 @@ patches, testing, and ideas. =head2 Win32 -Site library searches failed to look for ".../site/5.XXX/lib" -if ".../site/5.XXXYY/lib" wasn't found. This has been corrected. +Perl can now emulate fork() with multiple interpreters. This support +must be enabled at build time. See L for detailed information. When given a pathname that consists only of a drivename, such as C, opendir() and stat() now use the current working @@ -1324,8 +1298,6 @@ preserve compatibility with the older syntax, you might want to put a C in your program. For details and compatibility information, see L. -[TODO - GSAR] - =head1 New tests =over 4 @@ -1424,8 +1396,7 @@ See L. =item charnames -change#4052 -[TODO - Ilya Zakharevich ] +This pragma implements the C<\N> string escape. See L. =item Data::Dumper @@ -1511,11 +1482,6 @@ $PERL_VERSION now stands for C<$^V> (a string value) rather than for C<$]> Env now supports accessing environment variables like PATH as array variables. -=item ExtUtils::MakeMaker - -change#4135, also needs docs in module pod -[TODO - Ilya Zakharevich ] - =item Fcntl More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for @@ -1711,7 +1677,7 @@ Pod::InputObjects defines some input objects needed by Pod::Parser, and for advanced users of Pod::Parser that need more about a command besides its name and text. -As of release 5.6 of Perl, Pod::Parser is now the officially sanctioned +As of release 5.6.0 of Perl, Pod::Parser is now the officially sanctioned "base parser code" recommended for use by all pod2xxx translators. Pod::Text (pod2text) and Pod::Man (pod2man) have already been converted to use Pod::Parser and efforts to convert Pod::HTML (pod2html) are already @@ -1853,8 +1819,6 @@ C is now obsolete, and is only provided for backward-compatibility. It's been replaced by the C syntax. See L and L. -C to enable UTF-8 and Unicode support. - Lexical warnings pragma, C, to control optional warnings. See L. @@ -1867,10 +1831,6 @@ but access(2) knows better. =head1 Utility Changes -=head2 h2ph - -[TODO - Kurt Starsinic ] - =head2 perlcc C now supports the C and Bytecode backends. By default, @@ -1879,11 +1839,6 @@ optimized C backend. Support for non-Unix platforms has been improved. -=head2 h2xs - -change#4232 -[TODO - Ilya Zakharevich ] - =head1 Documentation Changes =over 4 diff --git a/pod/perlhist.pod b/pod/perlhist.pod index 4d9858e..17a13a2 100644 --- a/pod/perlhist.pod +++ b/pod/perlhist.pod @@ -336,6 +336,7 @@ the strings?). 5.5.650 2000-Feb-08 5.6 beta1 5.5.660 2000-Feb-22 5.6 beta2 5.5.670 2000-Feb-29 5.6 beta3 + 5.6.0-RC1 2000-Mar-09 5.6 release candidate 1 =head2 SELECTED RELEASE SIZES diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod index c5ffbaf..c8e31bf 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -4,14 +4,48 @@ perlunicode - Unicode support in Perl =head1 DESCRIPTION +=head2 Important Caveat + WARNING: The implementation of Unicode support in Perl is incomplete. -Expect sudden and unannounced changes! + +The following areas need further work. + +=over + +=item Input and Output Disciplines + +There is currently no easy way to mark data read from a file or other +external source as being utf8. This will be one of the major areas of +focus in the near future. + +=item Regular Expressions + +The existing regular expression compiler does not produce polymorphic +opcodes. This means that the determination on whether to match Unicode +characters is made when the pattern is compiled, based on whether the +pattern contains Unicode characters, and not when the matching happens +at run time. This needs to be changed to adaptively match Unicode if +the string to be matched is Unicode. + +=item C still needed to enable a few features + +The C pragma implements the tables used for Unicode support. These +tables are automatically loaded on demand, so the C pragma need not +normally be used. + +However, as a compatibility measure, this pragma must be explicitly used +to enable recognition of UTF-8 encoded literals and identifiers in the +source text. + +=back + +=head2 Byte and Character semantics Beginning with version 5.6, Perl uses logically wide characters to represent strings internally. This internal representation of strings uses the UTF-8 encoding. -In future, Perl-level operations will expect to work with characters +In future, Perl-level operations can be expected to work with characters rather than bytes, in general. However, as strictly an interim compatibility measure, Perl v5.6 aims to @@ -27,9 +61,7 @@ which allowed byte semantics in Perl operations, but only as long as none of the program's inputs are marked as being as source of Unicode character data. Such data may come from filehandles, from calls to external programs, from information provided by the system (such as %ENV), -or from literals and constants in the source text. Later, in -L, we'll see how such -inputs may be marked as being Unicode character data sources. +or from literals and constants in the source text. If the C<-C> command line switch is used, (or the ${^WIDE_SYSTEM_CALLS} global flag is set to C<1>), all system calls will use the @@ -40,8 +72,8 @@ Regardless of the above, the C pragma can always be used to force byte semantics in a particular lexical scope. See L. The C pragma is primarily a compatibility device that enables -recognition of UTF-8 in literals encountered by the parser. It is also -used for enabling some of the more experimental Unicode support features. +recognition of UTF-8 in literals encountered by the parser. It may also +be used for enabling some of the more experimental Unicode support features. Note that this pragma is only required until a future version of Perl in which character semantics will become the default. This pragma may then become a no-op. See L. @@ -58,7 +90,7 @@ on Unicode data, the C pragma should be used. Under character semantics, many operations that formerly operated on bytes change to operating on characters. For ASCII data this makes no difference, because UTF-8 stores ASCII in single bytes, but for -any character greater than C, the character is stored in +any character greater than C, the character may be stored in a sequence of two or more bytes, all of which have the high bit set. But by and large, the user need not worry about this, because Perl hides it from the user. A character in Perl is logically just a number @@ -75,9 +107,7 @@ Character semantics have the following effects: =item * Strings and patterns may contain characters that have an ordinal value -larger than 255. In Perl v5.6, this is only enabled if the lexical -scope has a C declaration (due to compatibility needs) but -future versions may enable this by default. +larger than 255. Presuming you use a Unicode editor to edit your program, such characters will typically occur directly within the literal strings as UTF-8 @@ -98,10 +128,6 @@ characters, including ideographs. (You are currently on your own when it comes to using the canonical forms of characters--Perl doesn't (yet) attempt to canonicalize variable names for you.) -This also needs C currently. [XXX: Why?!? High-bit chars were -syntax errors when they occurred within identifiers in previous versions, -so this should probably be enabled by default.] - =item * Regular expressions match characters instead of bytes. For instance, @@ -109,11 +135,6 @@ Regular expressions match characters instead of bytes. For instance, is provided to force a match a single byte ("C" in C, hence C<\C>).) -Unicode support in regular expressions needs C currently. -[XXX: Because the SWASH routines need to be loaded. And the RE engine -appears to need an overhaul to dynamically match Unicode anyway--the -current RE compiler creates different nodes with and without C.] - =item * Character classes in regular expressions match characters instead of @@ -121,8 +142,6 @@ bytes, and match against the character properties specified in the Unicode properties database. So C<\w> can be used to match an ideograph, for instance. -C is needed to enable this. See above. - =item * Named Unicode properties and block ranges make be used as character @@ -133,8 +152,6 @@ any mark character. Single letter properties may omit the brackets, so that can be written C<\pM> also. Many predefined character classes are available, such as C<\p{IsMirrored}> and C<\p{InTibetan}>. -C is needed to enable this. See above. - =item * The special pattern C<\X> match matches any extended Unicode sequence @@ -143,16 +160,12 @@ character is a base character and subsequent characters are mark characters that apply to the base character. It is equivalent to C<(?:\PM\pM*)>. -C is needed to enable this. See above. - =item * The C operator translates characters instead of bytes. It can also -be forced to translate between 8-bit codes and UTF-8 regardless of the -surrounding utf8 state. For instance, if you know your input in Latin-1, -you can say: +be forced to translate between 8-bit codes and UTF-8. For instance, if you +know your input in Latin-1, you can say: - use utf8; while (<>) { tr/\0-\xff//CU; # latin1 char to utf8 ... @@ -164,8 +177,6 @@ Similarly you could translate your output with No, C doesn't take /U or /C (yet?). -C is needed to enable this. See above. - =item * Case translation operators use the Unicode case translation tables