diff options
author | tjr <tjr@FreeBSD.org> | 2002-10-03 11:14:00 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-10-03 11:14:00 +0000 |
commit | b9c5c09473ee2f4b638163affeb9e55b277edc13 (patch) | |
tree | 9c2a8b9f409be3593989ff5802160deac01bfd18 /lib | |
parent | 48afd8f90439873197b676d9b967ca32fd3791b0 (diff) | |
download | FreeBSD-src-b9c5c09473ee2f4b638163affeb9e55b277edc13.zip FreeBSD-src-b9c5c09473ee2f4b638163affeb9e55b277edc13.tar.gz |
Point out that although toupper() and tolower() really accept rune_t's
and not just unsigned char's, callers should use towupper() and towlower()
instead when working with wide characters if portability is a concern.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/locale/tolower.3 | 16 | ||||
-rw-r--r-- | lib/libc/locale/toupper.3 | 16 |
2 files changed, 28 insertions, 4 deletions
diff --git a/lib/libc/locale/tolower.3 b/lib/libc/locale/tolower.3 index 9ef2c89..394895e 100644 --- a/lib/libc/locale/tolower.3 +++ b/lib/libc/locale/tolower.3 @@ -36,7 +36,7 @@ .\" @(#)tolower.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd October 3, 2002 .Dt TOLOWER 3 .Os .Sh NAME @@ -67,10 +67,22 @@ If the argument is an upper-case letter, the .Fn tolower function returns the corresponding lower-case letter if there is one; otherwise the argument is returned unchanged. +.Sh COMPATIBILITY +Although +.Fn tolower +accepts arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets, +this is a +.Bx 4.4 +extension and the +.Fn towlower +function should be used instead for maximum portability. .Sh SEE ALSO .Xr ctype 3 , .Xr islower 3 , -.Xr multibyte 3 +.Xr multibyte 3 , +.Xr towlower 3 .Sh STANDARDS The .Fn tolower diff --git a/lib/libc/locale/toupper.3 b/lib/libc/locale/toupper.3 index a1feaec..9d6d3ba 100644 --- a/lib/libc/locale/toupper.3 +++ b/lib/libc/locale/toupper.3 @@ -36,7 +36,7 @@ .\" @(#)toupper.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd October 3, 2002 .Dt TOUPPER 3 .Os .Sh NAME @@ -67,10 +67,22 @@ If the argument is a lower-case letter, the .Fn toupper function returns the corresponding upper-case letter if there is one; otherwise the argument is returned unchanged. +.Sh COMPATIBILITY +Although +.Fn toupper +accepts arguments outside of the range of the +.Vt "unsigned char" +type in locales with large character sets, +this is a +.Bx 4.4 +extension and the +.Fn towupper +function should be used instead for maximum portability. .Sh SEE ALSO .Xr ctype 3 , .Xr isupper 3 , -.Xr multibyte 3 +.Xr multibyte 3 , +.Xr towupper 3 .Sh STANDARDS The .Fn toupper |