Standard C Language Internationalization Programming

In ANSI/ISO standard C language specification and POSIX environment, country-specific and language-specific elements such as monetary and sorting order are defined as a locale for each country and language combination. Many standard C language library functions work appropriately in the current locale environment.

Languages such as Japanese and Chinese are composed of thousands of characters which cannot be handled by language C's 1-byte-long character (char) data type directly. Instead, you can handle them directly with the wide character (wchar_t) data type that represents a character with 2 bytes or 4 bytes, depending on implementation. A set of standard C library functions capable of wide characters is provided.

Furthermore, language C provide a mechanism to select messages such as label strings and error messages so that your program can show its user interface in the user's native language.

This document describes such international functionalities of language C. Codeset conversion is also mentioned.

Go to Internationalization Programming Top


Copyright (C) 2012 Kokusaika JP, Inc.
All rights reserved. No reproduction or republication without written permission.