| 125 |
The following comments apply when PCRE is running in UTF-8 mode: |
The following comments apply when PCRE is running in UTF-8 mode: |
| 126 |
</P> |
</P> |
| 127 |
<P> |
<P> |
| 128 |
1. PCRE assumes that the strings it is given contain valid UTF-8 codes. It does |
1. When you set the PCRE_UTF8 flag, the strings passed as patterns and subjects |
| 129 |
not diagnose invalid UTF-8 strings. If you pass invalid UTF-8 strings to PCRE, |
are checked for validity on entry to the relevant functions. If an invalid |
| 130 |
the results are undefined. |
UTF-8 string is passed, an error return is given. In some situations, you may |
| 131 |
|
already know that your strings are valid, and therefore want to skip these |
| 132 |
|
checks in order to improve performance. If you set the PCRE_NO_UTF8_CHECK flag |
| 133 |
|
at compile time or at run time, PCRE assumes that the pattern or subject it |
| 134 |
|
is given (respectively) contains only valid UTF-8 codes. In this case, it does |
| 135 |
|
not diagnose an invalid UTF-8 string. If you pass an invalid UTF-8 string to |
| 136 |
|
PCRE when PCRE_NO_UTF8_CHECK is set, the results are undefined. Your program |
| 137 |
|
may crash. |
| 138 |
</P> |
</P> |
| 139 |
<P> |
<P> |
| 140 |
2. In a pattern, the escape sequence \x{...}, where the contents of the braces |
2. In a pattern, the escape sequence \x{...}, where the contents of the braces |
| 185 |
Phone: +44 1223 334714 |
Phone: +44 1223 334714 |
| 186 |
</P> |
</P> |
| 187 |
<P> |
<P> |
| 188 |
Last updated: 04 February 2003 |
Last updated: 20 August 2003 |
| 189 |
<br> |
<br> |
| 190 |
Copyright © 1997-2003 University of Cambridge. |
Copyright © 1997-2003 University of Cambridge. |