Common Desktop Environment: Internationalization Programmer's Guide

Operating System Internationalized Functions

Table 2-9 lists the base operating system internationalized functions in a common open software environment.

Applications should perform proper locale management with the assumption that a locale may have from 1 to 4 bytes per coded character.

Table 2-9 Base Operating System Internationalized Functions

Locale Management 

Single-byte 

Multibyte 

Wide Character 

Convert mb <-> wc 

 

mbtowc

mbstowcs

wctomb

wcstombs

Classification 

isalpha

is*

 

isalpha

isw*

wctype

Case Mapping 

tolower

toupper

 

towlower

towupper

Format Miscellaneous 

 

localeconv

nl_langinfo

 

Format of Numeric 

 

strtol

strtod

wcstol

wcstod

wcstoi

Format Time/Monetary 

 

strftime

strptime

strfmon

wcsftime

String Copy 

 

strcat

strcpy

strncat

strncpy

wcscat

wcsncat

wcscpy

wcsncpy

String Collate 

 

strcoll

wcscoll

wcsxfrm

String Misc 

strlen

mblen

 

wcscmp>

wcsncmp

String Search 

strchr

strcspn

strpbrk

strrchr

strspn

strtok

 

wcschr

wcscspn

wcspbrk

wcsrchr

wcsspn

wcstok

wcswcs

wcscspn

I/O Display Width 

 

 

wcwidth [These functions are provided for applications using terminals. Graphical user interface (GUI) applications should not use these functions; instead, they should use font metric functions listed on "Simple Text" to determine spacing.]

wcswidth

I/O Printf 

 

printf

vprintf

sprintf

vsprint

fprintf

vfprint

printf

vprintf

sprintf

vsprint

frpintf

vfprint

 

I/O Scan 

 

scanf

sscanf

fscanf

scanf

sscanf

fscanf

I/O Character 

getc

gets

putc

puts

 

fgetwc

fgetws

fputwc

fputws

ungetwc

Message 

 

gettxt

catopen

catgets

catclose

 

Convert Codeset 

 

iconv_open

iconv

iconv_close