ANSI C provides five library functions that manage
multibyte characters and wide characters:
The behavior of all of these functions
depends on the current locale.
length of next multibyte character
convert multibyte character to wide character
convert wide character to multibyte character
convert multibyte character string to wide character string
convert wide character string to multibyte character string
See the setlocale()
It is expected that vendors providing compilation systems
targeted to this market will supply many more string-like
functions to simplify the handling of wide character strings.
However, for most application programs,
there is no need to convert any multibyte characters
to or from wide characters.
Programs such as diff,
will read in and write out multibyte characters,
needing only to check for an exact byte-for-byte match.
More complicated programs (such as grep)
that use regular expression pattern matching, may
need to understand multibyte characters,
but only the common set of functions that
manages the regular expression needs this knowledge.
The program grep
itself requires no other special multibyte character handling.
C language features
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003