aboutsummaryrefslogtreecommitdiffstats
path: root/doc/info/mds.texinfo
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-09-20 12:38:17 +0200
committerMattias Andrée <maandree@operamail.com>2014-09-20 12:38:17 +0200
commitbc836c1a57a408431071cf4242158c3ff1c0fd10 (patch)
tree6e70fd85c2bcb775cae2db59c0604a3e1d49a62e /doc/info/mds.texinfo
parenttypo (diff)
downloadmds-bc836c1a57a408431071cf4242158c3ff1c0fd10.tar.gz
mds-bc836c1a57a408431071cf4242158c3ff1c0fd10.tar.bz2
mds-bc836c1a57a408431071cf4242158c3ff1c0fd10.tar.xz
add verify_utf8
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc/info/mds.texinfo')
-rw-r--r--doc/info/mds.texinfo12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/info/mds.texinfo b/doc/info/mds.texinfo
index e191a73..6648760 100644
--- a/doc/info/mds.texinfo
+++ b/doc/info/mds.texinfo
@@ -3990,6 +3990,18 @@ Wrapper around @code{waitpid} that never returns on an
interruption unless it is interrupted one hundred times
within the same clock second. The parameters and return
value are exactly those of @code{waitpid}.
+
+@item @code{verify_utf8}[(@code{const char* string, int allow_modified_nul}) @arrow{} @code{int}]
+Checks whether a NUL-terminated string's encoding
+matches UTF-8. This function will reject the string
+if it does not use the shorted possible
+byte-combination for each character. However, if
+@code{allow_modified_nul} is set, it will allow
+@code{192 128} in place of @code{0} for a
+NUL-character.@footnote{Remember @code{0} is used
+to terminated the string, but @code{192 128} is not.}
+This function returns zero if the @code{string} is
+properly formatted, and @code{-1} otherwise.
@end table