1wctob(3)                   Library Functions Manual                   wctob(3)
2
3
4

NAME

6       wctob - try to represent a wide character as a single byte
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #include <wchar.h>
13
14       int wctob(wint_t c);
15

DESCRIPTION

17       The  wctob() function tests whether the multibyte representation of the
18       wide character c, starting in the initial state, consists of  a  single
19       byte.  If so, it is returned as an unsigned char.
20
21       Never  use this function.  It cannot help you in writing international‐
22       ized programs.  Internationalized programs must never distinguish  sin‐
23       gle-byte and multibyte characters.
24

RETURN VALUE

26       The wctob() function returns the single-byte representation of c, if it
27       exists, or EOF otherwise.
28

ATTRIBUTES

30       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
31       tributes(7).
32
33       ┌────────────────────────────────────────────┬───────────────┬─────────┐
34Interface                                   Attribute     Value   
35       ├────────────────────────────────────────────┼───────────────┼─────────┤
36wctob()                                     │ Thread safety │ MT-Safe │
37       └────────────────────────────────────────────┴───────────────┴─────────┘
38

STANDARDS

40       C11, POSIX.1-2008.
41

HISTORY

43       POSIX.1-2001, C99.
44

NOTES

46       The behavior of wctob() depends on the LC_CTYPE category of the current
47       locale.
48
49       This function should never be used.   Internationalized  programs  must
50       never  distinguish  single-byte  and  multibyte characters.  Use either
51       wctomb(3) or the thread-safe wcrtomb(3) instead.
52

SEE ALSO

54       btowc(3), wcrtomb(3), wctomb(3)
55
56
57
58Linux man-pages 6.05              2023-07-20                          wctob(3)
Impressum