Whiz Kid Technomagic -- man page for fgetu8 (libutf-8)

         #include <utf-8.h>

         unsigned int
         fgetu8(FILE *input)

         unsigned int
         utf8fgetc(FILE *input)

         unsigned int
         utf8getc(FILE *input)

         unsigned int
         utf8getchar()

## DESCRIPTION

         The fgetu8() function of utf-8 library reads one or more bytes from a
         UTF-8 formatted text file, and converts them to single UTC-4 (Unicode)
         value.

         utf8fgetc() and utfgetc() are macros which simply give fgetu8() a name
         that may be more convenient to remember. They are defined in <utf-8.h>.

         The fgetu8() function and the macros take one argument: input, which can
         be any open file.

         The utf8getchar() macro reads input from stdin.

## RETURN VALUES

         If input is NULL, or if a premature end-of-file condition occurs,
         fgetu8() returns EOF. If input contains valid UTF-8 codes, fgetu8() re-
         turns the converted UTC-4 value. Otherwise, it returns UTF8INVALID, de-
         fined in <utf-8.h>.

## SEE ALSO

         libutf-8(3),  fputu8(3),  sgetu8(3),  sputu8(3)

         F. Yergeau, UTF-8, a transformation format of Unicode and ISO 10646,
         RFC2279.

         D. Goldsmith, M. Davis, Using Unicode with MIME, RFC1641.

## STANDARDS

         ISO 10646-1: 1993 (``Unicode''), RFC 2279: 1998 (``UTF-8''), ISO
         9899: 1990 (``ISO C'').

## DIAGNOSTICS

         You should always check the RETURN VALUES against EOF and UTF8INVALID.

## AUTHORS

         This manual page was written by G. Adam Stanislav <adam@whizkidtech.net>.

## BUGS

[ Back to Whiz Kid Technomagic i18n tools ]