.Os
.Sh NAME
.Nm btowc ,
-.Nm wctob
+.Nm btowc_l ,
+.Nm wctob ,
+.Nm wctob_l
.Nd "convert between wide and single-byte characters"
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
+.In stdio.h
.In wchar.h
.Ft wint_t
-.Fn btowc "int c"
+.Fo btowc
+.Fa "int c"
+.Fc
.Ft int
-.Fn wctob "wint_t c"
+.Fo wctob
+.Fa "wint_t c"
+.Fc
+.In wchar.h
+.In xlocale.h
+.Ft wint_t
+.Fo btowc_l
+.Fa "int c"
+.Fa "locale_t loc"
+.Fc
+.Ft int
+.Fo wctob_l
+.Fa "wint_t c"
+.Fa "locale_t loc"
+.Fc
.Sh DESCRIPTION
The
.Fn btowc
.Fn wctob
returns
.Dv WEOF .
+.Pp
+While the
+.Fn btowc
+and
+.Fn wctob
+functions use the current locale, the
+.Fn btowc_l
+and
+.Fn wctob_l
+functions may be passed locales directly. See
+.Xr xlocale 3
+for more information.
+.Sh LEGACY SYNOPSIS
+.Pp
+The include file
+.In stdio.h
+is not necessary for these functions.
.Sh SEE ALSO
.Xr mbrtowc 3 ,
.Xr multibyte 3 ,
-.Xr wcrtomb 3
+.Xr wcrtomb 3 ,
+.Xr xlocale 3 ,
+.Xr compat 5
.Sh STANDARDS
The
.Fn btowc