diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-07-29 18:41:34 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-07-29 18:41:34 +0400 |
commit | a089857143b4879c7a12d6be7c030b7dfc6dcb8d (patch) | |
tree | 5c0f9c2bde1b4adc1f15a62c6e086a96303e47d6 /src/core/ngx_string.c | |
parent | 4c756c46cdf5879673d364bb07157c9c622c3fac (diff) |
rename ngx_utf_...() to ngx_utf8_...()
Diffstat (limited to 'src/core/ngx_string.c')
-rw-r--r-- | src/core/ngx_string.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c index 64ba703b7..2da6c8319 100644 --- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c @@ -952,7 +952,7 @@ ngx_decode_base64(ngx_str_t *dst, ngx_str_t *src) /* - * 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 @@ ngx_decode_base64(ngx_str_t *dst, ngx_str_t *src) */ 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 @@ ngx_utf_decode(u_char **p, size_t n) 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 @@ ngx_utf_length(u_char *p, size_t n) 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 @@ ngx_utf_length(u_char *p, size_t n) 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 @@ ngx_utf_cpystrn(u_char *dst, u_char *src, size_t n, size_t len) next = src; - if (ngx_utf_decode(&next, len) > 0x10ffff) { - /* invalid utf */ + if (ngx_utf8_decode(&next, len) > 0x10ffff) { + /* invalid UTF-8 */ break; } |