From c920d7941295fd6c46fffed9aa9e2e0de0b18570 Mon Sep 17 00:00:00 2001 From: ph10 Date: Mon, 3 Nov 2014 18:27:56 +0000 Subject: Make --enable-unicode the default. git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@132 6239d852-aaf2-0410-a92c-79f79f948069 --- doc/html/NON-AUTOTOOLS-BUILD.txt | 4 ++-- doc/html/README.txt | 38 ++++++++++++++++++-------------------- doc/html/pcre2.html | 23 ++++++++++++----------- doc/html/pcre2build.html | 33 +++++++++++++++------------------ doc/html/pcre2pattern.html | 28 ++++++++++++++-------------- doc/html/pcre2unicode.html | 18 +++++++++--------- 6 files changed, 70 insertions(+), 74 deletions(-) (limited to 'doc/html') diff --git a/doc/html/NON-AUTOTOOLS-BUILD.txt b/doc/html/NON-AUTOTOOLS-BUILD.txt index f5e22a6..d5289a1 100644 --- a/doc/html/NON-AUTOTOOLS-BUILD.txt +++ b/doc/html/NON-AUTOTOOLS-BUILD.txt @@ -325,7 +325,7 @@ cache can be deleted by selecting "File > Delete Cache". Studio, MSYS makefiles, MinGW makefiles, etc.) 8. The GUI will then list several configuration options. This is where - you can enable Unicode support or other PCRE2 optional features. + you can disable Unicode support or select other PCRE2 optional features. 9. Hit "Configure" again. The adjacent "Generate" button should now be active. @@ -399,4 +399,4 @@ The site currently has ports for PCRE1 releases, but PCRE2 should follow in due course. ========================== -Last Updated: 28 September 2014 +Last Updated: 03 November 2014 diff --git a/doc/html/README.txt b/doc/html/README.txt index 293c00a..7473979 100644 --- a/doc/html/README.txt +++ b/doc/html/README.txt @@ -179,24 +179,22 @@ library. They are also documented in the pcre2build man page. . When JIT support is enabled, pcre2grep automatically makes use of it, unless you add --disable-pcre2grep-jit to the "configure" command. -. If you want to make use of the support for UTF-8 Unicode character strings in - the 8-bit library, UTF-16 Unicode character strings in the 16-bit library, - and UTF-32 Unicode character strings in the 32-bit library, you must add - --enable-unicode to the "configure" command. Without it, the code for - handling UTF-8, UTF-16 and UTF-8 is not included. It is not possible to - configure one library with UTF support and the other without in the same - configuration. - - Even when --enable-unicode is included, the use of a UTF encoding still has - to be enabled by an option at run time. When PCRE2 is compiled with this - option, its input can only either be ASCII or UTF-8/16/32, even when running +. If you do not want to make use of the support for UTF-8 Unicode character + strings in the 8-bit library, UTF-16 Unicode character strings in the 16-bit + library, and UTF-32 Unicode character strings in the 32-bit library, you can + add --disable-unicode to the "configure" command. This reduces the size of + the libraries. It is not possible to configure one library with Unicode + support, and another without, in the same configuration. + + When Unicode support is available, the use of a UTF encoding still has to be + enabled by an option at run time. When PCRE2 is compiled with Unicode + support, its input can only either be ASCII or UTF-8/16/32, even when running on EBCDIC platforms. It is not possible to use both --enable-unicode and --enable-ebcdic at the same time. - When --enable-unicode is specified, as well as supporting UTF strings, PCRE2 - includes support for the \P, \p, and \X sequences that recognize Unicode - character properties. However, only the basic two-letter properties such as - Lu are supported. + As well as supporting UTF strings, Unicode support includes support for the + \P, \p, and \X sequences that recognize Unicode character properties. + However, only the basic two-letter properties such as Lu are supported. . You can build PCRE2 to recognize either CR or LF or the sequence CRLF or any of the preceding, or any of the Unicode newline sequences as indicating the @@ -285,7 +283,7 @@ library. They are also documented in the pcre2build man page. . It is possible to compile PCRE2 for use on systems that use EBCDIC as their character code (as opposed to ASCII/Unicode) by specifying - --enable-ebcdic + --enable-ebcdic --disable-unicode This automatically implies --enable-rebuild-chartables (see above). However, when PCRE2 is built this way, it always operates in EBCDIC. It cannot support @@ -543,8 +541,8 @@ from pcre2test. Other files whose names begin with "test" are used as working files in some tests. Some tests are relevant only when certain build-time options were selected. For -example, the tests for UTF-8/16/32 support are run only if --enable-unicode was -used. RunTest outputs a comment when it skips a test. +example, the tests for UTF-8/16/32 features are run only when Unicode support +is available. RunTest outputs a comment when it skips a test. Many of the tests that are not skipped are run twice if JIT support is available. On the second run, JIT compilation is forced. This testing can be @@ -633,7 +631,7 @@ JIT-specific features such as information output from pcre2test about JIT compilation. The sixteenth and seventeenth tests are run only in 8-bit mode. They check the -POSIX interface to the 8-bit library, withouth and with Unicode support, +POSIX interface to the 8-bit library, without and with Unicode support, respectively. @@ -828,4 +826,4 @@ The distribution should contain the files listed below. Philip Hazel Email local part: ph10 Email domain: cam.ac.uk -Last updated: 25 October 2014 +Last updated: 03 November 2014 diff --git a/doc/html/pcre2.html b/doc/html/pcre2.html index a94bd1a..4eac819 100644 --- a/doc/html/pcre2.html +++ b/doc/html/pcre2.html @@ -35,9 +35,10 @@ code units, which means that up to three separate libraries may be installed. The original work to extend PCRE to 16-bit and 32-bit code units was done by Zoltan Herczeg and Christian Persch, respectively. In all three cases, strings can be interpreted either as one character per code unit, or as UTF-encoded -Unicode, with support for Unicode general category properties. Unicode is -optional at build time, and must be enabled explicitly at run time. The version -of Unicode in use can be discovered by running +Unicode, with support for Unicode general category properties. Unicode support +is optional at build time (but is the default); however, processing strings as +UTF code units must be enabled explicitly at run time. The version of Unicode +in use can be discovered by running
   pcre2test -C
 
@@ -95,13 +96,13 @@ not exported.

If you are using PCRE2 in a non-UTF application that permits users to supply arbitrary patterns for compilation, you should be aware of a feature that -allows users to turn on UTF support from within a pattern, provided that PCRE2 -was built with Unicode support. For example, an 8-bit pattern that begins with -"(*UTF)" turns on UTF-8 mode, which interprets patterns and subjects as strings -of UTF-8 code units instead of individual 8-bit characters. This causes both -the pattern and any data against which it is matched to be checked for UTF-8 -validity. If the data string is very long, such a check might use sufficiently -many resources as to cause your application to lose performance. +allows users to turn on UTF support from within a pattern. For example, an +8-bit pattern that begins with "(*UTF)" turns on UTF-8 mode, which interprets +patterns and subjects as strings of UTF-8 code units instead of individual +8-bit characters. This causes both the pattern and any data against which it is +matched to be checked for UTF-8 validity. If the data string is very long, such +a check might use sufficiently many resources as to cause your application to +lose performance.

One way of guarding against this possibility is to use the @@ -173,7 +174,7 @@ use my two initials, followed by the two digits 10, at the domain cam.ac.uk.


REVISION

-Last updated: 28 September 2014 +Last updated: 03 November 2014
Copyright © 1997-2014 University of Cambridge.
diff --git a/doc/html/pcre2build.html b/doc/html/pcre2build.html index 9733057..2fbe197 100644 --- a/doc/html/pcre2build.html +++ b/doc/html/pcre2build.html @@ -115,27 +115,24 @@ to the configure command, as required.


Unicode and UTF SUPPORT

-To build PCRE2 with support for Unicode and UTF character strings, add +By default, PCRE2 is built with support for Unicode and UTF character strings. +To build it without Unicode support, add

-  --enable-unicode
+  --disable-unicode
 
-to the configure command. This setting applies to all three libraries, -adding support for UTF-8 to the 8-bit library, support for UTF-16 to the 16-bit -library, and support for UTF-32 to the to the 32-bit library. -It is not possible to build one library with -UTF support and another without in the same configuration. +to the configure command. This setting applies to all three libraries. It +is not possible to build one library with Unicode support, and another without, +in the same configuration.

-Of itself, this setting does not make PCRE2 treat strings as UTF-8, UTF-16 or -UTF-32. As well as compiling PCRE2 with this option, you also have have to set -the PCRE2_UTF option when you call pcre2_compile() to compile a pattern. +Of itself, Unicode support does not make PCRE2 treat strings as UTF-8, UTF-16 +or UTF-32. To do that you have have to set the PCRE2_UTF option when you call +pcre2_compile() to compile a pattern.

-If you set --enable-unicode when compiling in an EBCDIC environment, PCRE2 -expects its input to be either ASCII or UTF-8 (depending on the run-time -option). It is not possible to support both EBCDIC and UTF-8 codes in the same -version of the library. Consequently, --enable-unicode and --enable-ebcdic are -mutually exclusive. +It is not possible to support both EBCDIC and UTF-8 codes in the same version +of the library. Consequently, --enable-unicode and --enable-ebcdic are mutually +exclusive.

UTF support allows the libraries to process character codepoints up to 0x10ffff @@ -301,12 +298,12 @@ code is ASCII (or Unicode, which is a superset of ASCII). This is the case for most computer operating systems. PCRE2 can, however, be compiled to run in an EBCDIC environment by adding

-  --enable-ebcdic
+  --enable-ebcdic --disable-unicode
 
to the configure command. This setting implies --enable-rebuild-chartables. You should only use it if you know that you are in an EBCDIC environment (for example, an IBM mainframe operating system). The ---enable-ebcdic option is incompatible with --enable-unicode. +--enable-ebcdic option is incompatible with Unicode support.

The EBCDIC character that corresponds to an ASCII LF is assumed to have the @@ -469,7 +466,7 @@ Cambridge CB2 3QH, England.


REVISION

-Last updated: 28 September 2014 +Last updated: 03 November 2014
Copyright © 1997-2014 University of Cambridge.
diff --git a/doc/html/pcre2pattern.html b/doc/html/pcre2pattern.html index 11d8056..e9da45a 100644 --- a/doc/html/pcre2pattern.html +++ b/doc/html/pcre2pattern.html @@ -89,11 +89,11 @@ In the 8-bit and 16-bit PCRE2 libraries, characters may be coded either as single code units, or as multiple UTF-8 or UTF-16 code units. UTF-32 can be specified for the 32-bit library, in which case it constrains the character values to valid Unicode code points. To process UTF strings, PCRE2 must be -built to include Unicode support. When using UTF strings you must either call -the compiling function with the PCRE2_UTF option, or the pattern must start -with the special sequence (*UTF), which is equivalent to setting the relevant -option. How setting a UTF mode affects pattern matching is mentioned in several -places below. There is also a summary of features in the +built to include Unicode support (which is the default). When using UTF strings +you must either call the compiling function with the PCRE2_UTF option, or the +pattern must start with the special sequence (*UTF), which is equivalent to +setting the relevant option. How setting a UTF mode affects pattern matching is +mentioned in several places below. There is also a summary of features in the pcre2unicode page.

@@ -538,9 +538,9 @@ By default, characters whose code points are greater than 127 never match \d, \s, or \w, and always match \D, \S, and \W, although this may vary for characters in the range 128-255 when locale-specific matching is happening. These escape sequences retain their original meanings from before Unicode -support was available, mainly for efficiency reasons. If PCRE2 is compiled with -Unicode support, and the PCRE2_UCP option is set, the behaviour is changed so -that Unicode properties are used to determine character types, as follows: +support was available, mainly for efficiency reasons. If the PCRE2_UCP option +is set, the behaviour is changed so that Unicode properties are used to +determine character types, as follows:
   \d  any character that matches \p{Nd} (decimal digit)
   \s  any character that matches \p{Z} or \h or \v
@@ -641,11 +641,11 @@ an error.
 Unicode character properties
 

-When PCRE2 is built with Unicode support, three additional escape sequences -that match characters with specific properties are available. In 8-bit -non-UTF-8 mode, these sequences are of course limited to testing characters -whose codepoints are less than 256, but they do work in this mode. The extra -escape sequences are: +When PCRE2 is built with Unicode support (the default), three additional escape +sequences that match characters with specific properties are available. In +8-bit non-UTF-8 mode, these sequences are of course limited to testing +characters whose codepoints are less than 256, but they do work in this mode. +The extra escape sequences are:

   \p{xx}   a character with the xx property
   \P{xx}   a character without the xx property
@@ -3193,7 +3193,7 @@ Cambridge CB2 3QH, England.
 


REVISION

-Last updated: 19 October 2014 +Last updated: 03 November 2014
Copyright © 1997-2014 University of Cambridge.
diff --git a/doc/html/pcre2unicode.html b/doc/html/pcre2unicode.html index 52846fb..bc3b327 100644 --- a/doc/html/pcre2unicode.html +++ b/doc/html/pcre2unicode.html @@ -16,11 +16,12 @@ please consult the man page, in case the conversion went wrong. UNICODE AND UTF SUPPORT

-When PCRE2 is built with Unicode support, it acquires knowledge of Unicode -character properties and can process text strings in UTF-8, UTF-16, or UTF-32 -format (depending on the code unit width). By default, PCRE2 assumes that one -code unit is one character. To process a pattern as a UTF string, where a -character may require more than one code unit, you must call +When PCRE2 is built with Unicode support (which is the default), it has +knowledge of Unicode character properties and can process text strings in +UTF-8, UTF-16, or UTF-32 format (depending on the code unit width). However, by +default, PCRE2 assumes that one code unit is one character. To process a +pattern as a UTF string, where a character may require more than one code unit, +you must call pcre2_compile() with the PCRE2_UTF option flag, or the pattern must start with the sequence (*UTF). When either of these is the case, both the pattern and any subject @@ -28,9 +29,8 @@ strings that are matched against it are treated as UTF strings instead of strings of individual one-code-unit characters.

-If you build PCRE2 with Unicode support, the library will be bigger, but the -additional run time overhead is limited to testing the PCRE2_UTF flag -occasionally, so should not be very much. +If you do not need Unicode support you can build PCRE2 without it, in which +case the library will be smaller.


UNICODE PROPERTY SUPPORT @@ -261,7 +261,7 @@ Cambridge CB2 3QH, England. REVISION

-Last updated: 16 September 2014 +Last updated: 03 November 2014
Copyright © 1997-2014 University of Cambridge.
-- cgit v1.2.1