1TOWUPPER(3)                Linux Programmer's Manual               TOWUPPER(3)
2
3
4

NAME

6       towupper, towupper_l - convert a wide character to uppercase
7

SYNOPSIS

9       #include <wctype.h>
10
11       wint_t towupper(wint_t wc);
12       wint_t towupper_l(wint_t wc, locale_t locale);
13
14   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
15
16       towupper_l():
17           Since glibc 2.10:
18               _XOPEN_SOURCE >= 700
19           Before glibc 2.10:
20               _GNU_SOURCE
21

DESCRIPTION

23       The  towupper()  function is the wide-character equivalent of the toup‐
24       per(3) function.  If wc is a lowercase wide character, and there exists
25       an uppercase equivalent in the current locale, it returns the uppercase
26       equivalent of wc.  In all other cases, wc is returned unchanged.
27
28       The towupper_l() function performs the same task, but performs the con‐
29       version based on the character type information in the locale specified
30       by locale.  The behavior of towupper_l() is undefined if locale is  the
31       special  locale  object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a
32       valid locale object handle.
33
34       The argument wc must be representable as a wchar_t and be a valid char‐
35       acter in the locale or be the value WEOF.
36

RETURN VALUE

38       If  wc  was  convertible to uppercase, towupper() returns its uppercase
39       equivalent; otherwise it returns wc.
40

VERSIONS

42       The towupper_l() function first appeared in glibc 2.3.
43

ATTRIBUTES

45       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
46       tributes(7).
47
48       ┌─────────────────────────────────────┬───────────────┬────────────────┐
49Interface                            Attribute     Value          
50       ├─────────────────────────────────────┼───────────────┼────────────────┤
51towupper()                           │ Thread safety │ MT-Safe locale │
52       ├─────────────────────────────────────┼───────────────┼────────────────┤
53towupper_l()                         │ Thread safety │ MT-Safe        │
54       └─────────────────────────────────────┴───────────────┴────────────────┘
55

CONFORMING TO

57       towupper():  C99,  POSIX.1-2001  (XSI);  present as an XSI extension in
58       POSIX.1-2008, but marked obsolete.
59
60       towupper_l(): POSIX.1-2008.
61

NOTES

63       The behavior of these functions depends on the LC_CTYPE category of the
64       locale.
65
66       These functions are not very appropriate for dealing with Unicode char‐
67       acters, because Unicode knows about three cases: upper, lower, and  ti‐
68       tle case.
69

SEE ALSO

71       iswupper(3), towctrans(3), towlower(3), locale(7)
72

COLOPHON

74       This  page  is  part of release 5.13 of the Linux man-pages project.  A
75       description of the project, information about reporting bugs,  and  the
76       latest     version     of     this    page,    can    be    found    at
77       https://www.kernel.org/doc/man-pages/.
78
79
80
81GNU                               2021-03-22                       TOWUPPER(3)
Impressum