]>
Commit | Line | Data |
---|---|---|
15f05186 | 1 | .\" and Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com> |
fea681da | 2 | .\" |
e4a74ca8 | 3 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
fea681da MK |
4 | .\" |
5 | .\" References consulted: | |
6 | .\" GNU glibc-2 source code and manual | |
7 | .\" Dinkumware C library reference http://www.dinkumware.com/ | |
008f1ecc | 8 | .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html |
fea681da MK |
9 | .\" ISO/IEC 9899:1999 |
10 | .\" | |
ab47278f | 11 | .TH TOWUPPER 3 (date) "Linux man-pages (unreleased)" |
fea681da | 12 | .SH NAME |
e139568f | 13 | towupper, towupper_l \- convert a wide character to uppercase |
2c4b26fd AC |
14 | .SH LIBRARY |
15 | Standard C library | |
8fc3b2cf | 16 | .RI ( libc ", " \-lc ) |
fea681da MK |
17 | .SH SYNOPSIS |
18 | .nf | |
19 | .B #include <wctype.h> | |
68e4db0a | 20 | .PP |
fea681da | 21 | .BI "wint_t towupper(wint_t " wc ); |
e139568f | 22 | .BI "wint_t towupper_l(wint_t " wc ", locale_t " locale ); |
fea681da | 23 | .fi |
68e4db0a | 24 | .PP |
d39ad78f | 25 | .RS -4 |
e139568f MK |
26 | Feature Test Macro Requirements for glibc (see |
27 | .BR feature_test_macros (7)): | |
d39ad78f | 28 | .RE |
68e4db0a | 29 | .PP |
e139568f | 30 | .BR towupper_l (): |
9d2adbae MK |
31 | .nf |
32 | Since glibc 2.10: | |
5c10d2c5 | 33 | _XOPEN_SOURCE >= 700 |
9d2adbae MK |
34 | Before glibc 2.10: |
35 | _GNU_SOURCE | |
36 | .fi | |
fea681da | 37 | .SH DESCRIPTION |
60a90ecd MK |
38 | The |
39 | .BR towupper () | |
40 | function is the wide-character equivalent of the | |
41 | .BR toupper (3) | |
42 | function. | |
35cfd378 MK |
43 | If |
44 | .I wc | |
15f05186 MK |
45 | is a lowercase wide character, |
46 | and there exists an uppercase equivalent in the current locale, | |
47 | it returns the uppercase equivalent of | |
48 | .IR wc . | |
49 | In all other cases, | |
50 | .I wc | |
51 | is returned unchanged. | |
847e0d88 | 52 | .PP |
e139568f MK |
53 | The |
54 | .BR towupper_l () | |
55 | function performs the same task, | |
56 | but performs the conversion based on the character type information in | |
57 | the locale specified by | |
58 | .IR locale . | |
59 | The behavior of | |
f3ece15a | 60 | .BR towupper_l () |
e139568f MK |
61 | is undefined if |
62 | .I locale | |
63 | is the special locale object | |
d8a86e74 | 64 | .B LC_GLOBAL_LOCALE |
e139568f MK |
65 | (see |
66 | .BR duplocale (3)) | |
67 | or is not a valid locale object handle. | |
847e0d88 | 68 | .PP |
15f05186 | 69 | The argument |
35cfd378 | 70 | .I wc |
15f05186 | 71 | must be representable as a |
d8a86e74 | 72 | .I wchar_t |
e139568f | 73 | and be a valid character in the locale or be the value |
35cfd378 | 74 | .BR WEOF . |
15f05186 MK |
75 | .SH RETURN VALUE |
76 | If | |
77 | .I wc | |
78 | was convertible to uppercase, | |
79 | .BR towupper () | |
80 | returns its uppercase equivalent; | |
81 | otherwise it returns | |
82 | .IR wc . | |
53c9ce2d MK |
83 | .SH VERSIONS |
84 | The | |
85 | .BR towupper_l () | |
86 | function first appeared in glibc 2.3. | |
c15158e2 | 87 | .SH ATTRIBUTES |
fd42d1ae PH |
88 | For an explanation of the terms used in this section, see |
89 | .BR attributes (7). | |
c466875e MK |
90 | .ad l |
91 | .nh | |
fd42d1ae PH |
92 | .TS |
93 | allbox; | |
c466875e | 94 | lbx lb lb |
fd42d1ae PH |
95 | l l l. |
96 | Interface Attribute Value | |
97 | T{ | |
c15158e2 | 98 | .BR towupper () |
fd42d1ae PH |
99 | T} Thread safety MT-Safe locale |
100 | T{ | |
101 | .BR towupper_l () | |
102 | T} Thread safety MT-Safe | |
103 | .TE | |
c466875e MK |
104 | .hy |
105 | .ad | |
106 | .sp 1 | |
3113c7f3 | 107 | .SH STANDARDS |
e139568f MK |
108 | .BR towupper (): |
109 | C99, POSIX.1-2001 (XSI); | |
110 | present as an XSI extension in POSIX.1-2008, but marked obsolete. | |
847e0d88 | 111 | .PP |
e139568f MK |
112 | .BR towupper_l (): |
113 | POSIX.1-2008. | |
fea681da | 114 | .SH NOTES |
e139568f | 115 | The behavior of these functions depends on the |
1274071a | 116 | .B LC_CTYPE |
e139568f | 117 | category of the locale. |
fea681da | 118 | .PP |
e139568f | 119 | These functions are not very appropriate for dealing with Unicode characters, |
735334d4 | 120 | because Unicode knows about three cases: upper, lower, and title case. |
47297adb | 121 | .SH SEE ALSO |
e37e3282 MK |
122 | .BR iswupper (3), |
123 | .BR towctrans (3), | |
e139568f MK |
124 | .BR towlower (3), |
125 | .BR locale (7) |