1toascii(3) Library Functions Manual toascii(3)
2
3
4
6 toascii - convert character to ASCII
7
9 Standard C library (libc, -lc)
10
12 #include <ctype.h>
13
14 [[deprecated]] int toascii(int c);
15
16 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
17
18 toascii():
19 _XOPEN_SOURCE
20 || /* glibc >= 2.19: */ _DEFAULT_SOURCE
21 || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
22
24 toascii() converts c to a 7-bit unsigned char value that fits into the
25 ASCII character set, by clearing the high-order bits.
26
28 The value returned is that of the converted character.
29
31 For an explanation of the terms used in this section, see at‐
32 tributes(7).
33
34 ┌────────────────────────────────────────────┬───────────────┬─────────┐
35 │Interface │ Attribute │ Value │
36 ├────────────────────────────────────────────┼───────────────┼─────────┤
37 │toascii() │ Thread safety │ MT-Safe │
38 └────────────────────────────────────────────┴───────────────┴─────────┘
39
41 POSIX.1-2008.
42
44 SVr4, BSD, POSIX.1-2001. Obsolete in POSIX.1-2008, noting that it
45 cannot be used portably in a localized application.
46
48 Many people will be unhappy if you use this function. This function
49 will convert accented letters into random characters.
50
52 isascii(3), tolower(3), toupper(3)
53
54
55
56Linux man-pages 6.05 2023-07-20 toascii(3)