Example: POSIX locale

This example shows the POSIX (or C) locale categories and the source.

It is published in its entirety because:

In either case, in the following listing, you are able to look at the locale categories and view the source.

Note: By using the code example, you agree to the terms of the Code license and disclaimer information.
     comment_char <percent-sign> 
     escape_char  <slash> 


%
% 5716SS1 (C) COPYRIGHT IBM(R) CORP. 1991,1996 
% ALL RIGHTS RESERVED. 
% US GOVERNMENT USERS RESTRICTED RIGHTS - 
% USE, DUPLICATION OR DISCLOSURE RESTRICTED
% BY GSA ADP SCHEDULE CONTRACT WITH IBM CORP. 
% 
% LICENSED MATERIALS-PROPERTY OF IBM 
% 
% FILE NAME : POSIX 
% 
% COUNTRY/REGION: POSIX DEFAULT LOCALE 
%
% LANGUAGES(S): NOT SPECIFIED 
%
% DESCRIPTION: LOCALE SOURCE DEFINITION FILE.
% 

LC_CTYPE 

upper <A>;<B>;<C>;<D>;<E>;<F>;<G>;<H>;<I>;<J>;<K>;<L>;<M>;/
<N>;<O>;<P>;<Q>;<R>;<S>;<T>;<U>;<V>;<W>;<X>;<Y>;<Z>


lower <a>;<b>;<c>;<d>;<e>;<f>;<g>;<h>;<i>;<j>;<k>;<l>;<m>;/
<n>;<o>;<p>;<q>;<r>;<s>;<t>;<u>;<v>;<w>;<x>;<y>;<z>


space <tab>;<newline>;<vertical-tab>;<form-feed>;<carriage-return>;/
<space> 

cntrl <NUL>;<SOH>;<STX>;<ETX>;<EOT>;<ENQ>;<ACK>;<alert>;<backspace>;/
<tab>;<newline>;<vertical-tab>;<form-feed>;<carriage-return>;/
<SO>;<SI>;<DLE>;<DC1>;<DC2>;<DC3>;<DC4>;<NAK>;<SYN>;<ETB>;/
<CAN>;<EM>;<SUB>;<ESC>;<IS4>;<IS3>;<IS2>;<IS1>;<DEL>


punct <exclamation-mark>;<quotation-mark>;<number-sign>;/
<dollar-sign>;<percent-sign>;<ampersand>;<apostrophe>;/
<left-parenthesis>;<right-parenthesis>;<asterisk>;<plus-sign>;/
<comma>;<hyphen>;<period>;<slash>;/ 
<colon>;<semicolon>;<less-than-sign>;/
<equals-sign>;<greater-than-sign>;<question-mark>;/
<commercial-at>;/ 
<left-square-bracket>;<backslash>;/
<right-square-bracket>;<circumflex>;/ 
<underscore>;<grave-accent>;/
<left-curly-bracket>;<vertical-line>;<right-curly-bracket>;/
<tilde> 

digit <zero>;<one>;<two>;<three>;<four>;/
<five>;<six>;<seven>;<eight>;<nine> 

xdigit <zero>;<one>;<two>;<three>;<four>;/
<five>;<six>;<seven>;<eight>;<nine>;/
<A>;<B>;<C>;<D>;<E>;<F>;/
<a>;<b>;<c>;<d>;<e>;<f> 

blank <space>;/ 
<tab> 

toupper (<a>,<A>);(<b>,<B>);(<c>,<C>);(<d>,<D>);(<e>,<E>);/
(<f>,<F>);(<g>,<G>);(<h>,<H>);(<i>,<I>);(<j>,<J>);/
(<k>,<K>);(<l>,<L>);(<m>,<M>);(<n>,<N>);(<o>,<O>);/
(<p>,<P>);(<q>,<Q>);(<r>,<R>);(<s>,<S>);(<t>,<T>);/
(<u>,<U>);(<v>,<V>);(<w>,<W>);(<x>,<X>);(<y>,<Y>);/
(<z>,<Z>) 

tolower (<A>,<a>);(<B>,<b>);(<C>,<c>);(<D>,<d>);(<E>,<e>);/
(<F>,<f>);(<G>,<g>);(<H>,<h>);(<I>,<i>);(<J>,<j>);/
(<K>,<k>);(<L>,<l>);(<M>,<m>);(<N>,<n>);(<O>,<o>);/
(<P>,<p>);(<Q>,<q>);(<R>,<r>);(<S>,<s>);(<T>,<t>);/
(<U>,<u>);(<V>,<v>);(<W>,<w>);(<X>,<x>);(<Y>,<y>);/
(<Z>,<z>) 

END LC_CTYPE 

LC_COLLATE 

order_start 

<NUL> 
<SOH> 
<STX> 
<ETX>
<EOT> 
<ENQ> 
<ACK> 
<alert>
<backspace> 
<tab> 
<newline> 
<vertical-tab>
<form-feed> 
<carriage-return> 
<SO>
<SI> 
<DLE> 
<DC1> 
<DC2>
<DC3> 
<DC4> 
<NAK> 
<SYN>
<ETB> 
<CAN> 
<EM> 
<SUB>
<ESC> 
<IS4> 
<IS3> 
<IS2>
<IS1> 
<space> 
<exclamation-mark> 
<quotation-mark>
<number-sign> 
<dollar-sign> 
<percent-sign>
<ampersand> 
<apostrophe> 
<left-parenthesis>
<right-parenthesis> 
<asterisk> 
<plus-sign>
<comma> 
<hyphen> 
<period> 
<slash>
<zero> 
<one> 
<two> 
<three>
<four> 
<five> 
<six> 
<seven>
<eight> 
<nine> 
<colon> 
<semicolon>
<less-than-sign> 
<equals-sign> 
<greater-than-sign>
<question-mark> 
<commercial-at> 
<A>
<B> 
<C> 
<D> 
<E>
<F> 
<G> 
<H> 
<I>
<J> 
<K> 
<L> 
<M>
<N> 
<O> 
<P> 
<Q>
<R> 
<S> 
<T> 
<U>
<V> 
<W> 
<X> 
<Y>
<Z> 
<left-square-bracket> 
<backslash>
<right-square-bracket> 
<circumflex> 
<underscore>
<grave-accent> 
<a> 
<b> 
<c>
<d> 
<e> 
<f> 
<g>
<h> 
<i> 
<j> 
<k>
<l> 
<m> 
<n> 
<o>
<p> 
<q> 
<r> 
<s>
<t> 
<u> 
<v> 
<w>
<x> 
<y> 
<z> 
<left-curly-bracket>
<vertical-line> 
<right-curly-bracket> 
<tilde>
<DEL> 
UNDEFINED 

order_end 

END LC_COLLATE 

LC_MONETARY 

int_curr_symbol "" 
currency_symbol ""
mon_decimal_point "" 
mon_thousands_sep ""
mon_grouping -1 
positive_sign ""
negative_sign "" 
int_frac_digits -1
frac_digits -1 
p_cs_precedes -1 
p_sep_by_space -1 
n_cs_precedes -1 
n_sep_by_space -1
p_sign_posn -1 
n_sign_posn -1 

END LC_MONETARY 

LC_NUMERIC 

decimal_point "<period>" thousands_sep
"" grouping -1 

END LC_NUMERIC 

LC_TIME 

abday "<S><u><n>";/ 
"<M><o><n>";/
"<T><u><e>";/ 
"<W><e><d>";/
"<T><h><u>";/ 
"<F><r><i>";/
"<S><a><t>" 

day "<S><u><n><d><a><y>";/
"<M><o><n><d><a><y>";/ 
"<T><u><e><s><d><a><y>";/
"<W><e><d><n><e><s><d><a><y>";/
"<T><h><u><r><s><d><a><y>";/
"<F><r><i><d><a><y>";/ 
"<S><a><t><u><r><d><a><y>"


abmon "<J><a><n>";/ 
"<F><e><b>";/
"<M><a><r>";/ 
"<A><p><r>";/
"<M><a><y>";/ 
"<J><u><n>";/
"<J><u><l>";/ 
"<A><u><g>";/
"<S><e><p>";/ 
"<O><c><t>";/
"<N><o><v>";/ 
"<D><e><c>"


mon "<J><a><n><u><a><r><y>";/
"<F><e><b><r><u><a><r><y>";/
"<M><a><r><c><h>";/ 
"<A><p><r><i><l>";/
"<M><a><y>";/ 
"<J><u><n><e>";/
"<J><u><l><y>";/ 
"<A><u><g><u><s><t>";/
"<S><e><p><t><e><m><b><e><r>";/
"<O><c><t><o><b><e><r>";/
"<N><o><v><e><m><b><e><r>";/
"<D><e><c><e><m><b><e><r>"


d_t_fmt "%a %b %d %H:%M:%S %Z %Y" 

d_fmt "%m//%d//%y" 

t_fmt "%H:%M:%S" 

am_pm "<A><M>";"<P><M>"

t_fmt_ampm "%I:%M:%S %p" 

END LC_TIME 

LC_MESSAGES 

yesexpr "[yY][eE][sS]|[yY]" 
noexpr "[nN][oO]|[nN]"
yesstr "yes" 
nostr "no"

END LC_MESSAGES 

LC_TOD 

tzdiff 0 
tname "" 
dstname "" 
dststart 0,0,0,0 
dstend 0,0,0,0
dstshift 0 

END LC_TOD 
Related concepts
Locale categories