rename ngx_utf_...() to ngx_utf8_...()
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
index 64ba703..2da6c83 100644
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -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;
}