HP-UX 11i September 2002 Release Notes

New and Changed Internationalization Features
Multibyte Support Extension and Unix98 Support
Chapter 16
313
How to Get MSE/Unix98 Behavior
In order to get MSE/Unix98 behavior, the programs have to be compiled with the
-D_XOPEN_SOURCE=500 macro definition and the variable has to be defined in the
environment.
Under the Korn, Bourne, and POSIX shells, this is done with:
UNIX_STD=98
export UNIX_STD
Under the C shell this is done using
setenv UNIX_STD 98
A cc compiler equal to HP92453-01 A.11.01.20 HP C Compiler or newer is required to
get this functionality.
Below is a summary list of new and modified APIs. For further details, please refer to the
corresponding manpages.
New Interfaces
The following APIs are newly added to libc and will not affect existing code:
btowc()
btowc() returns the wide-character representation of a given single-byte character.
fwide()
fwide() sets the stream orientation.
fwprintf(), swprintf(), wprintf()
These APIs print formatted wide-character output.
fwscanf(), swscanf(), wscanf()
These APIs process formatted wide-character input.
mbrlen()
mbrlen() returns the number of bytes in a wide character. Note that the behavior of this
function is affected by the LC_CTYPE category of the current locale.
mbrtowc()
mbrtowc() converts a stream of bytes to a wide-character code. Note that the behavior of
this function is affected by the LC_CTYPE category of the current locale.
mbsinit()
mbsinit() determines whether the object pointed to by the first argument, which
contains shift state information, describes an initial conversion state.