[Pcre-svn] [1109] code/trunk/doc/pcreunicode.3: pcre32: docs…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [1109] code/trunk/doc/pcreunicode.3: pcre32: docs: Document the 21-bit masking support
Revision: 1109
          http://vcs.pcre.org/viewvc?view=rev&revision=1109
Author:   chpe
Date:     2012-10-16 16:56:58 +0100 (Tue, 16 Oct 2012)


Log Message:
-----------
pcre32: docs: Document the 21-bit masking support

Modified Paths:
--------------
    code/trunk/doc/pcreunicode.3


Modified: code/trunk/doc/pcreunicode.3
===================================================================
--- code/trunk/doc/pcreunicode.3    2012-10-16 15:56:55 UTC (rev 1108)
+++ code/trunk/doc/pcreunicode.3    2012-10-16 15:56:58 UTC (rev 1109)
@@ -184,6 +184,16 @@
 the PCRE_NO_UTF32_CHECK flag at compile time or at run time, PCRE assumes that
 the pattern or subject it is given (respectively) contains only valid UTF-32
 sequences. In this case, it does not diagnose an invalid UTF-32 string.
+.P
+UTF-32 only uses the lowest 21 bits of the 32 bit characters, and the
+application may use the upper bits for internal purposes. To allow you to
+pass these strings to PCRE unmodified (thus avoiding the costly operation of
+creating a copy of the string with the upper bits masked), PCRE accepts
+these 32-bit character strings as-is, but only uses the lowest 21 bits for
+matching, if you pass the PCRE_NO_UTF32_CHECK flag to \fBpcre32_exec()\fP and
+\fBpcre32_dfa_exec()\fP. However, in this situation, you will have to apply
+your own validity check, and avoid the use of JIT optimization.
+(The latter restriction may be lifter in a later version of PCRE.)
 .
 .
 .SS "General comments about UTF modes"