/[pcre]/code/trunk/doc/pcreunicode.3
ViewVC logotype

Diff of /code/trunk/doc/pcreunicode.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 678 by ph10, Sun Aug 28 15:23:03 2011 UTC revision 683 by ph10, Tue Sep 6 10:37:15 2011 UTC
# Line 70  codes. In this case, it does not diagnos Line 70  codes. In this case, it does not diagnos
70  If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set, what  If you pass an invalid UTF-8 string when PCRE_NO_UTF8_CHECK is set, what
71  happens depends on why the string is invalid. If the string conforms to the  happens depends on why the string is invalid. If the string conforms to the
72  "old" definition of UTF-8 (RFC 2279), it is processed as a string of characters  "old" definition of UTF-8 (RFC 2279), it is processed as a string of characters
73  in the range 0 to 0x7FFFFFFF. In other words, apart from the initial validity  in the range 0 to 0x7FFFFFFF by \fBpcre_dfa_exec()\fP and the interpreted
74  test, PCRE (when in UTF-8 mode) handles strings according to the more liberal  version of \fBpcre_exec()\fP. In other words, apart from the initial validity
75  rules of RFC 2279. However, if the string does not even conform to RFC 2279,  test, these functions (when in UTF-8 mode) handle strings according to the more
76  the result is undefined. Your program may crash.  liberal rules of RFC 2279. However, the just-in-time (JIT) optimization for
77    \fBpcre_exec()\fP supports only RFC 3629. If you are using JIT optimization, or
78    if the string does not even conform to RFC 2279, the result is undefined. Your
79    program may crash.
80  .P  .P
81  If you want to process strings of values in the full range 0 to 0x7FFFFFFF,  If you want to process strings of values in the full range 0 to 0x7FFFFFFF,
82  encoded in a UTF-8-like manner as per the old RFC, you can set  encoded in a UTF-8-like manner as per the old RFC, you can set
83  PCRE_NO_UTF8_CHECK to bypass the more restrictive test. However, in this  PCRE_NO_UTF8_CHECK to bypass the more restrictive test. However, in this
84  situation, you will have to apply your own validity check.  situation, you will have to apply your own validity check, and avoid the use of
85    JIT optimization.
86  .  .
87  .  .
88  .SS "General comments about UTF-8 mode"  .SS "General comments about UTF-8 mode"
# Line 97  bytes, for example: \ex{100}{3}. Line 101  bytes, for example: \ex{100}{3}.
101  .P  .P
102  5. The escape sequence \eC can be used to match a single byte in UTF-8 mode,  5. The escape sequence \eC can be used to match a single byte in UTF-8 mode,
103  but its use can lead to some strange effects. This facility is not available in  but its use can lead to some strange effects. This facility is not available in
104  the alternative matching function, \fBpcre_dfa_exec()\fP.  the alternative matching function, \fBpcre_dfa_exec()\fP, nor is it supported
105    by the JIT optimization of \fBpcre_exec()\fP. If JIT optimization is requested
106    for a pattern that contains \eC, it will not succeed, and so the matching will
107    be carried out by the normal interpretive function.
108  .P  .P
109  6. The character escapes \eb, \eB, \ed, \eD, \es, \eS, \ew, and \eW correctly  6. The character escapes \eb, \eB, \ed, \eD, \es, \eS, \ew, and \eW correctly
110  test characters of any code value, but, by default, the characters that PCRE  test characters of any code value, but, by default, the characters that PCRE
# Line 151  Cambridge CB2 3QH, England. Line 158  Cambridge CB2 3QH, England.
158  .rs  .rs
159  .sp  .sp
160  .nf  .nf
161  Last updated: 24 August 2011  Last updated: 06 September 2011
162  Copyright (c) 1997-2011 University of Cambridge.  Copyright (c) 1997-2011 University of Cambridge.
163  .fi  .fi

Legend:
Removed from v.678  
changed lines
  Added in v.683

  ViewVC Help
Powered by ViewVC 1.1.5