What is UNIX

The ISO C Amendment 1:Multibyte Support Extension

A White Paper from the Base Working Group.

Version 1 Last update March 12 1997.

Full Text Available in Go Solo 2.


This white paper gives a brief outline of the extension made to the UNIX specification for the ISO C Amendment 1 (multibyte support extension). Since XSH4 Version 2 was aligned with a previous draft of ISO C Amendment 1, only the additions and changes are noted here.

This paper is part of a series of brief papers describing new and changed features in the UNIX specification.

1.1 ISO/IEC 9899:1990/Amendment 1:1995

Eastwood is fully aligned with ISO/IEC 9899:1990/Amendment 1:1995, which adds extensive multibyte support to the C Standard. The value of __STDC__VERSION for this revision of the specification is 199409L.

1.2 What is new in Eastwood from ISO C Amendment 1

The UNIX specification includes the following new interfaces and header files from ISO C Amendment 1.

New interfaces

btowc() fwide() fwprintf() fwscanf() mbrlen()
mbrtowc() mbsinit() mbsrtowcs() swprintf() swscanf()
towctrans() vfwprintf() vswprintf() vwprintf() wcrtomb()
wcsrtombs() wcsstr() wctob() wctrans() wmemchr()
wmemcmp() wmemcpy() wmemmove() wmemset() wprintf()

The New Headers

<iso646.h> <wctype.h>

The <iso646.h> header contains alternative spellings for C language tokens.

The <wctype.h> header contains the multibyte versions of the functions contained in <ctype.h>.

1.3 Changes from Issue 4 V2

putwc() - put wide character on a stream

This routine has changed the function prototype from XPG4 V2 to ISO MSE.

XSH4 V2 Prototype:

wint_t putwc(wint_t wc, FILE *stream);

XSH5 Prototype:

wint_t putwc(wchar_t wc, FILE *stream);

wcsftime() - convert date and time to wide character string

This routine has changed the function prototype from XPG4 V2 to ISO MSE.

XSH4 V2 prototype:

size_t wcsftime( wchar_t *, size_t, const char *, const struct tm *);

XSH5 prototype:

size_t   wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);

wcstok() - split wide character string into tokens

This routine has changed the function prototype from XPG4 V2 to ISO MSE. There is now a third argument to the prototype.

XSH4 V2 prototype:

wchar_t *wcstok(wchar_t *, const wchar_t *);

XSH5 prototype:

wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);

wcswcs() - find a wide character string

This function was renamed in the final ISO Amendment 1 to wcsstr(). The wcswcs() function remains in Eastwood for compatibility, but new applications are recommended to use the wcsstr() routine.

Read other technical papers.

Read or download the complete Single UNIX Specification from http://www.UNIX-systems.org/go/unix.

Copyright © 1997-1998 The Open Group

UNIX is a registered trademark of The Open Group.