1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
|
.\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\"
.\" ڰȨͨǰ,һֲɺͷƪĿ汾.
.\"
.\" ձطԭƷǰ,ƺͷֲİ汾.
.\"
.\" ΪLinuxں˺Ϳ⾭,ֲҳִܻ߹ʱ.()дķ߲
е,ΪʹðڵϢɵʧҲ.ѵıֲ,()ڴ
ʱDzθвͬ,רҵ֮,Ҳܹﵽһ.
.\"
.\" ֲʽӹ,ûаԭ,빫ϱƷİȨ.
.\"
.\" İȨ riser,BitBIRD www.linuxforum.net 2000
.\" 1993724Rik Faith (faith@cs.unc.edu)
.\" 199761Jochen Hein(jochen.hein@delphi.central.de)
.TH LOCALE 7 "1993424" "Linux" "Linux Programmer's Manual(LinuxԱֲ)"
.SH NAME()
locale \- ֧
.SH SYNOPSIS()
.nf
.B #include <locale.h>
.fi
.SH DESCRIPTION()
locale һϵĻ.
һЩ: ѶϢ, ַͬ, ֹ, ȵ.
Ҫܹж locale ʺڲͬĻҪ.
.PP
ͷļ
.B <locale.h>
ڸҵе,ͺ.
.PP
ĺ:
.B setlocale()
õǰ locale,
.B localeconv()
ָʽϢ.
.PP
ҪıػϢвͬ; ǶԺķʽ
ǵ
.B setlocale()
ĵһ, ͿһΪҪ locale:
.TP
.B LC_COLLATE
ĺ
.B strcoll()
.BR strxfrm()
ִзʽ, strxfrm() ԱػĸַȽ.
,
¹ s Ϊ "ss".
.TP
.B LC_CTYPE
ַຯ
.B isupper()
.BR toupper()
ִзʽ,
Ķַֽ
.B mblen()
.BR wctomb()
ִзʽ.
.TP
.B LC_MONETARY
.B localeconv()
صϢ, ЩϢ, Լ
Сǧλ֮ijʽϸ. ЩϢɺ
.BR strfmon()
ڲ.
.TP
.B LC_MESSAGES
ʾϢԼֵֵı﷽ʽ.
GNU C-library:
.B rpmatch()
ڷʹЩϢ.
.TP
.B LC_NUMERIC
ڿʹ locale ʱ,
.B printf()
.B scanf()
ʹõϢ.ϢҲ
.B localeconv()
ȡ.
.TP
.B LC_TIME
.B strftime()
ִзʽʾڵظʽĵǰʱ;
,ŷľֵʹõ 24 Сʱʱ,
12 Сʱʱ.
.TP
.B LC_ALL
е.
.PP
.B setlocale()
ĵڶΪ,
.BR """""" ,
ΪĬϵlocale,ͨ¼ȷ:
.IP 1.
зǿյĻ
.BR LC_ALL ,
ʹ
.B LC_ALL
ֵ.
.IP 2.
һгͬĻ䲻Ϊ, ʹø÷ֵ.
.IP 3.
зǿյĻ
.BR LANG ,
ʹ
.B LANG
ֵ.
.PP
ڱָʽֵ
.B localeconv()
ص
.B struct lconv ,
:
.nf
struct lconv
{
/* (ǻʽ)Ϣ. */
char *decimal_point; /* Сַ. */
char *thousands_sep; /* ǧķָ. */
/* ÿԪؾÿİ;ָԽߵԪԽ.һֵΪCHAR_MAXԪرʾ
.һֵΪ0Ԫرʾǰַиߵ. */
char *grouping;
/* Ϣ. */
/* ǰַISO 4217ͨ.
ĸַǷָ. ַ'\0'. */
char *int_curr_symbol;
char *currency_symbol; /* ػҷ. */
char *mon_decimal_point; /* Сַ. */
char *mon_thousands_sep; /* ǧķָ. */
char *mon_grouping; /* ǰ''Ԫ. */
char *positive_sign; /* ֵ. */
char *negative_sign; /* ֵ. */
char int_frac_digits; /* ͨõ. */
char frac_digits; /* ʹõ. */
/* currency_symbolһֵΪ1,˳෴Ϊ0. */
char p_cs_precedes;
/* currency_symbolֵ֮һոΪ1. */
char p_sep_by_space;
/* currency_symbolһֵΪ1,˳෴Ϊ0. */
char n_cs_precedes;
/* currency_symbolֵ֮һոΪ1. */
char n_sep_by_space;
/* ֵֵλ:
ֵcurrency_symbolԲΪ0.
ֵַcurrency_symbolΪ1.
ֵַcurrency_symbol֮Ϊ2.
ֵַcurrency_symbolΪ3.
ֵַcurrency_symbol֮Ϊ4. */
char p_sign_posn;
char n_sign_posn;
};
.fi
.SH "CONFORMS TO(ѭ)"
POSIX.1
.SH "SEE ALSO()"
.BR setlocale (3),
.BR localeconv (3),
.BR locale (1),
.BR localedef (1),
.BR rpmatch (3),
.BR strfmon (3),
.BR strcoll (3),
.BR strxfrm (3),
.BR strftime (3)
.SH "[İά]"
riser Email:boomer@ccidnet.com
.SH "[ݸ]"
2000/11/07
.SH "[йLinux̳manֲҳƻ]"
.TP
.BI www.cmpp.net/
|