GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SGETU8(3) FreeBSD Library Functions Manual SGETU8(3)

sgetu8
utf-8 library function manual page

#include <utf-8.h>

unsigned int
sgetu8(unsigned int *chars, char *string);

unsigned int
utf8sgetc(unsigned int *chars, char *string);

The sgetu8() function of utf-8 library reads a sequence of one or more characters from a UTF-8 formatted string, which it converts to a single UTC-4 (Unicode) value.

utf8sgetc() is a macro which simply gives sgetu8() a name that may be more convenient to remember. It is defined in ⟨utf-8.h⟩.

The sgetu8() function and the utf8sgetc() macro take two arguments: chars, a pointer to an integer for an additional return value, and string, which contains the sequence of one or more UTF-8 characters.

If string is NULL, or if a premature end-of-string condition occurs, sgetu8() returns EOF. If string contains valid UTF-8 codes, sgetu8() returns the converted UTC-4 value. Otherwise, it returns UTF8INVALID, defined in ⟨utf-8.h⟩.

Additionally, if chars is not NULL, sgetu8() will fill it in with the number of characters read from string. This allows you to determine where the next UTF-8 encoded character sequence starts in the string.

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

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

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

ISO 10646-1: 1993 (``Unicode''), RFC 2044: 1996 (``UTF-8''), ANSI X3.159-1989 (“ANSI C89”).

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

This manual page was written by G. Adam Stanislav ⟨adam@whizkidtech.net⟩.

None known.
April 1, 1999 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.