Manual Reference Pages - SPUTU8 (3)
- utf-8 library function manual page
.Fd #include <utf-8.h>
sputu8 unsigned int c char *buffer
utf8sputc unsigned int c char *buffer
function of utf-8 library converts a UTC-4 (31-bit Unicode) integer to a sequence
of one or more characters representing its UTF-8 value, and writes the result to
a buffer (character string). It appends a NUL at the end of the buffer, so it can be
processed as a standard C string.
is a macro which simply gives
a name that may be more convenient to remember. It is defined in
function and the
macro take two arguments:
the UTC-4 code, and
a pointer to a string of characters. The buffer must have at least seven
bytes available for writing: UTF-8 encodes Unicode into 1 - 6 characters, plus we
need room for the terminating NUL.
returns the pointer to the terminating NUL. This allows you to append the next sequence
of characters without having to determine where the string ends after each call to
returns NULL. If
is not a valid UTC-4 code (i.e., its high bit is set), no conversion takes place, and
UTF-8, a transformation format of Unicode and ISO 10646
Using Unicode with MIME
ISO 10646-1: 1993 (Unicode), RFC 2044: 1996 (UTF-8),
You should always compare the
If they are NULL, no conversion took place. Otherwise, if they are identical,
was not a valid UTC-8 integer. Anything else indicates successful conversion.
manual page was written by
.An G. Adam Stanislav Aq firstname.lastname@example.org .
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.