| 613 |
PCRE_NO_UTF8_CHECK |
PCRE_NO_UTF8_CHECK |
| 614 |
</pre> |
</pre> |
| 615 |
When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is |
When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is |
| 616 |
automatically checked. If an invalid UTF-8 sequence of bytes is found, |
automatically checked. There is a discussion about the |
| 617 |
<b>pcre_compile()</b> returns an error. If you already know that your pattern is |
<a href="pcre.html#utf8strings">validity of UTF-8 strings</a> |
| 618 |
valid, and you want to skip this check for performance reasons, you can set the |
in the main |
| 619 |
PCRE_NO_UTF8_CHECK option. When it is set, the effect of passing an invalid |
<a href="pcre.html"><b>pcre</b></a> |
| 620 |
UTF-8 string as a pattern is undefined. It may cause your program to crash. |
page. If an invalid UTF-8 sequence of bytes is found, <b>pcre_compile()</b> |
| 621 |
Note that this option can also be passed to <b>pcre_exec()</b> and |
returns an error. If you already know that your pattern is valid, and you want |
| 622 |
<b>pcre_dfa_exec()</b>, to suppress the UTF-8 validity checking of subject |
to skip this check for performance reasons, you can set the PCRE_NO_UTF8_CHECK |
| 623 |
strings. |
option. When it is set, the effect of passing an invalid UTF-8 string as a |
| 624 |
|
pattern is undefined. It may cause your program to crash. Note that this option |
| 625 |
|
can also be passed to <b>pcre_exec()</b> and <b>pcre_dfa_exec()</b>, to suppress |
| 626 |
|
the UTF-8 validity checking of subject strings. |
| 627 |
</P> |
</P> |
| 628 |
<br><a name="SEC8" href="#TOC1">COMPILATION ERROR CODES</a><br> |
<br><a name="SEC8" href="#TOC1">COMPILATION ERROR CODES</a><br> |
| 629 |
<P> |
<P> |
| 1250 |
When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8 |
When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8 |
| 1251 |
string is automatically checked when <b>pcre_exec()</b> is subsequently called. |
string is automatically checked when <b>pcre_exec()</b> is subsequently called. |
| 1252 |
The value of <i>startoffset</i> is also checked to ensure that it points to the |
The value of <i>startoffset</i> is also checked to ensure that it points to the |
| 1253 |
start of a UTF-8 character. If an invalid UTF-8 sequence of bytes is found, |
start of a UTF-8 character. There is a discussion about the validity of UTF-8 |
| 1254 |
<b>pcre_exec()</b> returns the error PCRE_ERROR_BADUTF8. If <i>startoffset</i> |
strings in the |
| 1255 |
contains an invalid value, PCRE_ERROR_BADUTF8_OFFSET is returned. |
<a href="pcre.html#utf8strings">section on UTF-8 support</a> |
| 1256 |
|
in the main |
| 1257 |
|
<a href="pcre.html"><b>pcre</b></a> |
| 1258 |
|
page. If an invalid UTF-8 sequence of bytes is found, <b>pcre_exec()</b> returns |
| 1259 |
|
the error PCRE_ERROR_BADUTF8. If <i>startoffset</i> contains an invalid value, |
| 1260 |
|
PCRE_ERROR_BADUTF8_OFFSET is returned. |
| 1261 |
</P> |
</P> |
| 1262 |
<P> |
<P> |
| 1263 |
If you already know that your subject is valid, and you want to skip these |
If you already know that your subject is valid, and you want to skip these |
| 1883 |
</P> |
</P> |
| 1884 |
<br><a name="SEC22" href="#TOC1">REVISION</a><br> |
<br><a name="SEC22" href="#TOC1">REVISION</a><br> |
| 1885 |
<P> |
<P> |
| 1886 |
Last updated: 30 July 2007 |
Last updated: 09 August 2007 |
| 1887 |
<br> |
<br> |
| 1888 |
Copyright © 1997-2007 University of Cambridge. |
Copyright © 1997-2007 University of Cambridge. |
| 1889 |
<br> |
<br> |