Datasheet
The C and C++ Libraries
4-26 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
4.6 Tailoring locale and CTYPE
This section describes functions related to locale. Applications use locale when they
display or process data that is dependent on the local language or region, for example
character order, monetary symbols, decimal point, time, and date.
See the
rt_locale.h
include file for more information on locale-related functions.
4.6.1 Selecting locale at link time
The
locale
subsystem of the C library can be selected at link time or extended to be
selectable at runtime. The following points describe the use of locale categories by the
library:
• The default implementation of each locale category is for the C locale. The library
also provides an alternative, ISO8859-1 (Latin 1 alphabet) implementation of
each locale category that you can select at link time.
• Both the C and ISO8859-1 default implementations provide only one locale to
select at runtime.
• You can replace each locale category individually.
• You can include as many locales in each category as you choose and you can
name your locales as you choose.
• Each locale category uses one word in the private static data of the library.
• The locale category data is read-only and position independent.
•
scanf()
forces the inclusion of the LC_CTYPE locale category, but in either of
the default locales this adds only 260 bytes of read-only data to several kilobytes
of code.