| 52 |
</P> |
</P> |
| 53 |
<br><a name="SEC2" href="#TOC1">PCRE's 8-BIT and 16-BIT LIBRARIES</a><br> |
<br><a name="SEC2" href="#TOC1">PCRE's 8-BIT and 16-BIT LIBRARIES</a><br> |
| 54 |
<P> |
<P> |
| 55 |
From release 8.30, two separate PCRE libraries can be built. The original one |
From release 8.30, two separate PCRE libraries can be built. The original one |
| 56 |
supports 8-bit character strings, whereas the newer 16-bit library supports |
supports 8-bit character strings, whereas the newer 16-bit library supports |
| 57 |
character strings encoded in 16-bit units. The <b>pcretest</b> program can be |
character strings encoded in 16-bit units. The <b>pcretest</b> program can be |
| 58 |
used to test both libraries. However, it is itself still an 8-bit program, |
used to test both libraries. However, it is itself still an 8-bit program, |
| 59 |
reading 8-bit input and writing 8-bit output. When testing the 16-bit library, |
reading 8-bit input and writing 8-bit output. When testing the 16-bit library, |
| 60 |
the patterns and data strings are converted to 16-bit format before being |
the patterns and data strings are converted to 16-bit format before being |
| 61 |
passed to the PCRE library functions. Results are converted to 8-bit for |
passed to the PCRE library functions. Results are converted to 8-bit for |
| 62 |
output. |
output. |
| 63 |
</P> |
</P> |
| 64 |
<P> |
<P> |
| 65 |
References to functions and structures of the form <b>pcre[16]_xx</b> below |
References to functions and structures of the form <b>pcre[16]_xx</b> below |
| 66 |
mean "<b>pcre_xx</b> when using the 8-bit library or <b>pcre16_xx</b> when using |
mean "<b>pcre_xx</b> when using the 8-bit library or <b>pcre16_xx</b> when using |
| 67 |
the 16-bit library". |
the 16-bit library". |
| 68 |
</P> |
</P> |
| 69 |
<br><a name="SEC3" href="#TOC1">COMMAND LINE OPTIONS</a><br> |
<br><a name="SEC3" href="#TOC1">COMMAND LINE OPTIONS</a><br> |
| 70 |
<P> |
<P> |
| 71 |
<b>-16</b> |
<b>-16</b> |
| 72 |
If both the 8-bit and the 16-bit libraries have been built, this option causes |
If both the 8-bit and the 16-bit libraries have been built, this option causes |
| 73 |
the 16-bit library to be used. If only the 16-bit library has been built, this |
the 16-bit library to be used. If only the 16-bit library has been built, this |
| 74 |
is the default (so has no effect). If only the 8-bit library has been built, |
is the default (so has no effect). If only the 8-bit library has been built, |
| 75 |
this option causes an error. |
this option causes an error. |
| 76 |
</P> |
</P> |
| 77 |
<P> |
<P> |
| 82 |
<P> |
<P> |
| 83 |
<b>-C</b> |
<b>-C</b> |
| 84 |
Output the version number of the PCRE library, and all available information |
Output the version number of the PCRE library, and all available information |
| 85 |
about the optional features that are included, and then exit. All other options |
about the optional features that are included, and then exit. All other options |
| 86 |
are ignored. |
are ignored. |
| 87 |
</P> |
</P> |
| 88 |
<P> |
<P> |
| 89 |
<b>-C</b> <i>option</i> |
<b>-C</b> <i>option</i> |
| 90 |
Output information about a specific build-time option, then exit. This |
Output information about a specific build-time option, then exit. This |
| 91 |
functionality is intended for use in scripts such as <b>RunTest</b>. The |
functionality is intended for use in scripts such as <b>RunTest</b>. The |
| 92 |
following options output the value indicated: |
following options output the value indicated: |
| 93 |
<pre> |
<pre> |
| 94 |
linksize the internal link size (2, 3, or 4) |
linksize the internal link size (2, 3, or 4) |
| 95 |
newline the default newline setting: |
newline the default newline setting: |
| 96 |
CR, LF, CRLF, ANYCRLF, or ANY |
CR, LF, CRLF, ANYCRLF, or ANY |
| 97 |
</pre> |
</pre> |
| 98 |
The following options output 1 for true or zero for false: |
The following options output 1 for true or zero for false: |
| 99 |
<pre> |
<pre> |
| 100 |
jit just-in-time support is available |
jit just-in-time support is available |
| 101 |
pcre16 the 16-bit library was built |
pcre16 the 16-bit library was built |
| 102 |
pcre8 the 8-bit library was built |
pcre8 the 8-bit library was built |
| 103 |
ucp Unicode property support is available |
ucp Unicode property support is available |
| 104 |
utf UTF-8 and/or UTF-16 support is available |
utf UTF-8 and/or UTF-16 support is available |
| 105 |
</PRE> |
</PRE> |
| 106 |
</P> |
</P> |
| 134 |
<P> |
<P> |
| 135 |
<b>-m</b> |
<b>-m</b> |
| 136 |
Output the size of each compiled pattern after it has been compiled. This is |
Output the size of each compiled pattern after it has been compiled. This is |
| 137 |
equivalent to adding <b>/M</b> to each regular expression. The size is given in |
equivalent to adding <b>/M</b> to each regular expression. The size is given in |
| 138 |
bytes for both libraries. |
bytes for both libraries. |
| 139 |
</P> |
</P> |
| 140 |
<P> |
<P> |
| 172 |
neither <b>-i</b> nor <b>-d</b> is present on the command line. This behaviour |
neither <b>-i</b> nor <b>-d</b> is present on the command line. This behaviour |
| 173 |
means that the output from tests that are run with and without <b>-s</b> should |
means that the output from tests that are run with and without <b>-s</b> should |
| 174 |
be identical, except when options that output information about the actual |
be identical, except when options that output information about the actual |
| 175 |
running of a match are set. |
running of a match are set. |
| 176 |
<br> |
<br> |
| 177 |
<br> |
<br> |
| 178 |
The <b>-M</b>, <b>-t</b>, and <b>-tm</b> options, which give information about |
The <b>-M</b>, <b>-t</b>, and <b>-tm</b> options, which give information about |
| 276 |
The following table shows additional modifiers for setting PCRE compile-time |
The following table shows additional modifiers for setting PCRE compile-time |
| 277 |
options that do not correspond to anything in Perl: |
options that do not correspond to anything in Perl: |
| 278 |
<pre> |
<pre> |
| 279 |
<b>/8</b> PCRE_UTF8 ) when using the 8-bit |
<b>/8</b> PCRE_UTF8 ) when using the 8-bit |
| 280 |
<b>/?</b> PCRE_NO_UTF8_CHECK ) library |
<b>/?</b> PCRE_NO_UTF8_CHECK ) library |
| 281 |
|
|
| 282 |
<b>/8</b> PCRE_UTF16 ) when using the 16-bit |
<b>/8</b> PCRE_UTF16 ) when using the 16-bit |
| 309 |
</pre> |
</pre> |
| 310 |
As well as turning on the PCRE_UTF8/16 option, the <b>/8</b> modifier causes |
As well as turning on the PCRE_UTF8/16 option, the <b>/8</b> modifier causes |
| 311 |
all non-printing characters in output strings to be printed using the |
all non-printing characters in output strings to be printed using the |
| 312 |
\x{hh...} notation. Otherwise, those less than 0x100 are output in hex without |
\x{hh...} notation. Otherwise, those less than 0x100 are output in hex without |
| 313 |
the curly brackets. |
the curly brackets. |
| 314 |
</P> |
</P> |
| 315 |
<P> |
<P> |
| 661 |
2: b |
2: b |
| 662 |
</pre> |
</pre> |
| 663 |
If the strings contain any non-printing characters, they are output as \xhh |
If the strings contain any non-printing characters, they are output as \xhh |
| 664 |
escapes if the value is less than 256 and UTF mode is not set. Otherwise they |
escapes if the value is less than 256 and UTF mode is not set. Otherwise they |
| 665 |
are output as \x{hh...} escapes. See below for the definition of non-printing |
are output as \x{hh...} escapes. See below for the definition of non-printing |
| 666 |
characters. If the pattern has the <b>/+</b> modifier, the output for substring |
characters. If the pattern has the <b>/+</b> modifier, the output for substring |
| 667 |
0 is followed by the the rest of the subject string, identified by "0+" like |
0 is followed by the the rest of the subject string, identified by "0+" like |
| 881 |
You can copy a file written by <b>pcretest</b> to a different host and reload it |
You can copy a file written by <b>pcretest</b> to a different host and reload it |
| 882 |
there, even if the new host has opposite endianness to the one on which the |
there, even if the new host has opposite endianness to the one on which the |
| 883 |
pattern was compiled. For example, you can compile on an i86 machine and run on |
pattern was compiled. For example, you can compile on an i86 machine and run on |
| 884 |
a SPARC machine. When a pattern is reloaded on a host with different |
a SPARC machine. When a pattern is reloaded on a host with different |
| 885 |
endianness, the confirmation message is changed to: |
endianness, the confirmation message is changed to: |
| 886 |
<pre> |
<pre> |
| 887 |
Compiled pattern (byte-inverted) loaded from /some/file |
Compiled pattern (byte-inverted) loaded from /some/file |
| 888 |
</pre> |
</pre> |
| 889 |
The test suite contains some saved pre-compiled patterns with different |
The test suite contains some saved pre-compiled patterns with different |
| 890 |
endianness. These are reloaded using "<!" instead of just "<". This suppresses |
endianness. These are reloaded using "<!" instead of just "<". This suppresses |
| 891 |
the "(byte-inverted)" text so that the output is the same on all hosts. It also |
the "(byte-inverted)" text so that the output is the same on all hosts. It also |
| 892 |
forces debugging output once the pattern has been reloaded. |
forces debugging output once the pattern has been reloaded. |
| 893 |
</P> |
</P> |
| 894 |
<P> |
<P> |
| 895 |
File names for saving and reloading can be absolute or relative, but note that |
File names for saving and reloading can be absolute or relative, but note that |