/[pcre]/code/trunk/doc/html/pcreapi.html
ViewVC logotype

Diff of /code/trunk/doc/html/pcreapi.html

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

revision 210 by ph10, Mon Aug 6 15:23:29 2007 UTC revision 211 by ph10, Thu Aug 9 09:52:43 2007 UTC
# Line 613  page. Line 613  page.
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>
# Line 1247  code that demonstrates how to do this in Line 1250  code that demonstrates how to do this in
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
# Line 1875  Cambridge CB2 3QH, England. Line 1883  Cambridge CB2 3QH, England.
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 &copy; 1997-2007 University of Cambridge.  Copyright &copy; 1997-2007 University of Cambridge.
1889  <br>  <br>

Legend:
Removed from v.210  
changed lines
  Added in v.211

  ViewVC Help
Powered by ViewVC 1.1.5