You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
653 B
Groff
20 lines
653 B
Groff
13 years ago
|
.TH fmt_utf8 3
|
||
|
.SH NAME
|
||
|
fmt_utf8 \- encode 31-bit unsigned integer using UTF-8 rules
|
||
|
.SH SYNTAX
|
||
|
.B #include <fmt.h>
|
||
|
|
||
|
size_t \fBfmt_utf8\fP(char *\fIdest\fR,uint32_t \fIsource\fR);
|
||
|
.SH DESCRIPTION
|
||
|
fmt_utf8 encodes a 31-bit unsigned integer using the UTF-8 rules. This
|
||
|
can take from 1 byte (0-0x7f) up to 5 bytes (0x4000000-0x7fffffff).
|
||
|
Values larger than 0x7fffffff cannot be represented in this encoding.
|
||
|
|
||
|
If \fIdest\fR equals FMT_LEN (i.e. is NULL), fmt_utf8 returns the
|
||
|
number of bytes it would have written.
|
||
|
|
||
|
For convenience, fmt.h defines the integer FMT_UTF8 to be big enough to
|
||
|
contain every possible fmt_utf8 output.
|
||
|
.SH "SEE ALSO"
|
||
|
scan_utf8(3)
|