]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/toascii.3
9fb6809b8cd7e2927d63c3bd3bb88c14e1e7d29c
[thirdparty/man-pages.git] / man3 / toascii.3
1 .\" Copyright (c) 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" Added BUGS section, aeb, 950919
6 .\"
7 .TH TOASCII 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
8 .SH NAME
9 toascii \- convert character to ASCII
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ", " \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <ctype.h>
16 .PP
17 .BI "int toascii(int " "c" );
18 .fi
19 .PP
20 .RS -4
21 Feature Test Macro Requirements for glibc (see
22 .BR feature_test_macros (7)):
23 .RE
24 .PP
25 .BR toascii ():
26 .nf
27 _XOPEN_SOURCE
28 || /* Glibc since 2.19: */ _DEFAULT_SOURCE
29 || /* Glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
30 .fi
31 .SH DESCRIPTION
32 .BR toascii ()
33 converts
34 .I c
35 to a 7-bit
36 .I "unsigned char"
37 value that fits into the ASCII character set, by clearing the
38 high-order bits.
39 .SH RETURN VALUE
40 The value returned is that of the converted character.
41 .SH ATTRIBUTES
42 For an explanation of the terms used in this section, see
43 .BR attributes (7).
44 .ad l
45 .nh
46 .TS
47 allbox;
48 lbx lb lb
49 l l l.
50 Interface Attribute Value
51 T{
52 .BR toascii ()
53 T} Thread safety MT-Safe
54 .TE
55 .hy
56 .ad
57 .sp 1
58 .SH STANDARDS
59 SVr4, BSD, POSIX.1-2001.
60 POSIX.1-2008 marks
61 .BR toascii ()
62 as obsolete,
63 noting that it cannot be used portably in a localized application.
64 .SH BUGS
65 Many people will be unhappy if you use this function.
66 This function will convert accented letters into random characters.
67 .SH SEE ALSO
68 .BR isascii (3),
69 .BR tolower (3),
70 .BR toupper (3)