Mercurial > hg > nginx-site
comparison xml/en/docs/dev/development_guide.xml @ 2572:c6c259d3601a
Development guide: updated ngx_utf8_length() example.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 21 Jul 2020 12:09:34 +0300 |
parents | 621ffbc159b6 |
children | 454af1d39021 |
comparison
equal
deleted
inserted
replaced
2571:3e47eecce384 | 2572:c6c259d3601a |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="Development guide" | 9 <article name="Development guide" |
10 link="/en/docs/dev/development_guide.html" | 10 link="/en/docs/dev/development_guide.html" |
11 lang="en" | 11 lang="en" |
12 rev="9"> | 12 rev="10"> |
13 | 13 |
14 <section name="Introduction" id="introduction"> | 14 <section name="Introduction" id="introduction"> |
15 | 15 |
16 | 16 |
17 <section name="Code layout" id="code_layout"> | 17 <section name="Code layout" id="code_layout"> |
6667 if (c < 0x80) { | 6667 if (c < 0x80) { |
6668 p++; | 6668 p++; |
6669 continue; | 6669 continue; |
6670 } | 6670 } |
6671 | 6671 |
6672 if (ngx_utf8_decode(&p, n) > 0x10ffff) { | 6672 if (ngx_utf8_decode(&p, last - p) > 0x10ffff) { |
6673 /* invalid UTF-8 */ | 6673 /* invalid UTF-8 */ |
6674 return n; | 6674 return n; |
6675 } | 6675 } |
6676 } | 6676 } |
6677 | 6677 |