.\" Copyright (c) 1999 G. Adam Stanislav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" libutf-8 v.1 .\" .Dd April 1, 1999 .Dt LIBUTF-8 3 .Os .Sh NAME .Nm utf-8 .Nd library function manual page .Sh SYNOPSIS .Fd #include .Ft unsigned int .Fn fgetu8 "FILE *input" .Ft int .Fn fputu8 "unsigned int c" "FILE *output" .Ft unsigned int .Fn sgetu8 "unsigned char *string" "int *chars" .Ft char * .Fn sputu8 "unsigned int c" "char *buffer" .Sh DESCRIPTION The .Nm utf-8 library .Aq Pa libutf-8.so contains functions for the conversion of Unicode files and strings. These functions have been designed in the style of the .Fn fgetc and .Fn fputc standard C functions. .Pp The .Fn fgetu8 and .Fn fputu8 functions work with files. The .Fn sgetu8 and .Fn sputu8 functions convert text strings in the computer memory. .Pp The .Fn fgetu8 and .Fn sgetu8 functions convert UTF-8 formatted data into a 32-bit Unicode-style integer (UCS-4); the .Fn fputu8 and .Fn sputu8 functions do the opposite conversion. .Sh SEE ALSO .Xr fgetu8 3 , .Xr fputu8 3 , .Xr sgetu8 3 , .Xr sputu8 3 .Rs .%A F. Yergeau .%T UTF-8, a transformation format of Unicode and ISO 10646 .%O RFC2044 .Re .Rs .%A D. Goldsmith, M. Davis .%T Using Unicode with MIME .%O RFC1641 .Re .Sh STANDARDS ISO 10646-1: 1993 (``Unicode''), RFC 2044: 1996 (``UTF-8''), .St -ansiC . .Sh AUTHORS This manual page was written by .An G. Adam Stanislav Aq adam@whizkidtech.net .