BTOWC(3) | Library Functions Manual | BTOWC(3)

# NAME

`btowc` —
convert a single byte character to a wide character

# LIBRARY

Standard C Library (libc, -lc)

# SYNOPSIS

`#include <wchar.h>`

wint_t
`btowc`(int c);

# DESCRIPTION

The `btowc`() function converts a single byte character c in the initial shift state of the current locale to a corresponding wide character.

The behaviour of `btowc`() is affected by the `LC_CTYPE` category of the current locale.

# RETURN VALUES

The `btowc`() function returns:

`WEOF`
  If c is `EOF` or if (unsigned char) c does not correspond to a valid single byte character representation.
(otherwise)
  A wide character corresponding to c.

# ERRORS

No errors are defined.

# SEE ALSO

mbrtowc(3), setlocale(3), wctob(3)

# STANDARDS

The `btowc`() function conforms to ISO/IEC 9899/AMD1:1995 (“ISO C90, Amendment 1”).

March 3, 2003 | NetBSD 9.3