Mercurial > hg > nginx
diff src/core/ngx_string.c @ 2125:8e4b9d2acde8
rename ngx_utf_...() to ngx_utf8_...()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 29 Jul 2008 14:41:34 +0000 |
parents | 2f2052fdd882 |
children | 8c6521eedf84 |
line wrap: on
line diff
--- a/src/core/ngx_string.c Tue Jul 29 14:31:03 2008 +0000 +++ b/src/core/ngx_string.c Tue Jul 29 14:41:34 2008 +0000 @@ -952,7 +952,7 @@ /* - * ngx_utf_decode() decodes two and more bytes UTF sequences only + * ngx_utf8_decode() decodes two and more bytes UTF sequences only * the return values: * 0x80 - 0x10ffff valid character * 0x110000 - 0xfffffffd invalid sequence @@ -961,7 +961,7 @@ */ uint32_t -ngx_utf_decode(u_char **p, size_t n) +ngx_utf8_decode(u_char **p, size_t n) { size_t len; uint32_t u, i, valid; @@ -1018,7 +1018,7 @@ size_t -ngx_utf_length(u_char *p, size_t n) +ngx_utf8_length(u_char *p, size_t n) { u_char c, *last; size_t len; @@ -1034,8 +1034,8 @@ continue; } - if (ngx_utf_decode(&p, n) > 0x10ffff) { - /* invalid utf */ + if (ngx_utf8_decode(&p, n) > 0x10ffff) { + /* invalid UTF-8 */ return n; } } @@ -1045,7 +1045,7 @@ u_char * -ngx_utf_cpystrn(u_char *dst, u_char *src, size_t n, size_t len) +ngx_utf8_cpystrn(u_char *dst, u_char *src, size_t n, size_t len) { u_char c, *next; @@ -1073,8 +1073,8 @@ next = src; - if (ngx_utf_decode(&next, len) > 0x10ffff) { - /* invalid utf */ + if (ngx_utf8_decode(&next, len) > 0x10ffff) { + /* invalid UTF-8 */ break; }