line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Locale::Currency::Format; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
require 5.006_00; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1461
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use Exporter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4705
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$Locale::Currency::Format::VERSION = '1.33'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
@Locale::Currency::Format::ISA = qw(Exporter); |
12
|
|
|
|
|
|
|
@Locale::Currency::Format::EXPORT = qw( |
13
|
|
|
|
|
|
|
currency_format |
14
|
|
|
|
|
|
|
currency_symbol |
15
|
|
|
|
|
|
|
decimal_precision |
16
|
|
|
|
|
|
|
decimal_separator |
17
|
|
|
|
|
|
|
thousands_separator |
18
|
|
|
|
|
|
|
currency_set |
19
|
|
|
|
|
|
|
FMT_NOZEROS |
20
|
|
|
|
|
|
|
FMT_STANDARD |
21
|
|
|
|
|
|
|
FMT_COMMON |
22
|
|
|
|
|
|
|
FMT_SYMBOL |
23
|
|
|
|
|
|
|
FMT_HTML |
24
|
|
|
|
|
|
|
FMT_NAME |
25
|
|
|
|
|
|
|
SYM_UTF |
26
|
|
|
|
|
|
|
SYM_HTML |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
@Locale::Currency::Format::EXPORT_OK = qw($error); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
%Locale::Currency::Format::EXPORT_TAGS = ( |
32
|
|
|
|
|
|
|
DEFAULT => [@Locale::Currency::Format::EXPORT], |
33
|
|
|
|
|
|
|
default => [@Locale::Currency::Format::EXPORT], |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
$Locale::Currency::Format::error = q{}; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Macros for format options |
39
|
|
|
|
|
|
|
sub FMT_NOZEROS() { 0x0001 } |
40
|
|
|
|
|
|
|
sub FMT_STANDARD() { 0x0002 } |
41
|
|
|
|
|
|
|
sub FMT_SYMBOL() { 0x0004 } |
42
|
|
|
|
|
|
|
sub FMT_COMMON() { 0x0008 } |
43
|
|
|
|
|
|
|
sub FMT_HTML() { 0x0010 } |
44
|
|
|
|
|
|
|
sub FMT_NAME() { 0x0020 } |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Macros for symbol options |
47
|
|
|
|
|
|
|
sub SYM_UTF() { 0x0001 } |
48
|
|
|
|
|
|
|
sub SYM_HTML() { 0x0002 } |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# Constants |
51
|
|
|
|
|
|
|
my $EMPTY = q{}; |
52
|
|
|
|
|
|
|
my $SPACE = q{ }; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# File variables |
55
|
|
|
|
|
|
|
my ($name, $frac_len, $thou_sep, $dec_sep, |
56
|
|
|
|
|
|
|
$space_sep, $utf_sym, $htm_sym, $com_sym, $pre) = (0..8); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
my %original; |
59
|
|
|
|
|
|
|
my %currency; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
*::_error = \$Locale::Currency::Format::error; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub currency_format { |
64
|
11
|
|
|
11
|
1
|
1083
|
my ($code, $amt, $style) = @_; |
65
|
|
|
|
|
|
|
|
66
|
11
|
100
|
|
|
|
35
|
if (!defined $amt) { |
67
|
2
|
|
|
|
|
7
|
$::_error = 'Undefined currency amount'; |
68
|
2
|
|
|
|
|
8
|
return; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
9
|
50
|
|
|
|
18
|
if (!defined $code) { |
72
|
0
|
|
|
|
|
0
|
$::_error = 'Undefined currency code'; |
73
|
0
|
|
|
|
|
0
|
return; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
9
|
|
|
|
|
13
|
my $ucc = uc $code; |
77
|
9
|
|
|
|
|
15
|
my $cur = $currency{$ucc}; |
78
|
9
|
100
|
|
|
|
19
|
if (!$cur) { |
79
|
1
|
|
|
|
|
8
|
$::_error = 'Invalid currency code'; |
80
|
1
|
|
|
|
|
3
|
return; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
8
|
100
|
100
|
|
|
42
|
$amt = format_number( |
84
|
|
|
|
|
|
|
$amt, |
85
|
|
|
|
|
|
|
$cur->[$frac_len] || 0, # round-off precision |
86
|
|
|
|
|
|
|
$style ? !($style & 0x1) : 1, # trailing zero or no |
87
|
|
|
|
|
|
|
$cur->[$thou_sep], # thousand separator |
88
|
|
|
|
|
|
|
$cur->[$dec_sep] # decimal separator |
89
|
|
|
|
|
|
|
); |
90
|
|
|
|
|
|
|
|
91
|
8
|
100
|
|
|
|
16
|
$style = $style ? $style & 0x00FE : FMT_STANDARD; |
92
|
|
|
|
|
|
|
|
93
|
8
|
50
|
66
|
|
|
70
|
return $style == FMT_SYMBOL && $cur->[$utf_sym] |
|
|
50
|
66
|
|
|
|
|
|
|
100
|
66
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
94
|
|
|
|
|
|
|
? join($cur->[$space_sep], $cur->[$pre] ? ($cur->[$utf_sym], $amt) |
95
|
|
|
|
|
|
|
: ($amt, $cur->[$utf_sym])) |
96
|
|
|
|
|
|
|
: $style == FMT_HTML && $cur->[$htm_sym] |
97
|
|
|
|
|
|
|
? join($cur->[$space_sep], $cur->[$pre] ? ($cur->[$htm_sym], $amt) |
98
|
|
|
|
|
|
|
: ($amt, $cur->[$htm_sym])) |
99
|
|
|
|
|
|
|
: $style == FMT_COMMON && $cur->[$com_sym] |
100
|
|
|
|
|
|
|
? join($cur->[$space_sep], $cur->[$pre] ? ($cur->[$com_sym], $amt) |
101
|
|
|
|
|
|
|
: ($amt, $cur->[$com_sym])) |
102
|
|
|
|
|
|
|
: $style == FMT_NAME |
103
|
|
|
|
|
|
|
? join($SPACE, $amt, $cur->[$name]) |
104
|
|
|
|
|
|
|
: join($SPACE, $amt, $ucc) |
105
|
|
|
|
|
|
|
; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
sub currency_symbol { |
109
|
6
|
|
|
6
|
1
|
49
|
my ($code, $type) = @_; |
110
|
|
|
|
|
|
|
|
111
|
6
|
100
|
|
|
|
25
|
if (!defined $code) { |
112
|
1
|
|
|
|
|
4
|
$::_error = 'Undefined currency code'; |
113
|
1
|
|
|
|
|
29
|
return; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
5
|
100
|
|
|
|
12
|
$type = SYM_UTF unless $type; |
117
|
5
|
100
|
100
|
|
|
39
|
if ($type != SYM_HTML and $type != SYM_UTF) { |
118
|
1
|
|
|
|
|
4
|
$::_error = 'Invalid symbol type'; |
119
|
1
|
|
|
|
|
2
|
return; |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
4
|
|
|
|
|
10
|
my $cur = $currency{uc $code}; |
123
|
4
|
100
|
|
|
|
13
|
if (!$cur) { |
124
|
1
|
|
|
|
|
2
|
$::_error = 'Invalid currency code'; |
125
|
1
|
|
|
|
|
2
|
return; |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
3
|
100
|
|
|
|
12
|
my $sym = $type == SYM_UTF ? $cur->[$utf_sym] : $cur->[$htm_sym]; |
129
|
3
|
100
|
|
|
|
8
|
if (!$sym) { |
130
|
1
|
50
|
|
|
|
7
|
$::_error = 'Non-existant currency' |
131
|
|
|
|
|
|
|
. ($type == SYM_UTF ? ' UTF ' : ' HTML ') |
132
|
|
|
|
|
|
|
. 'symbol'; |
133
|
1
|
|
|
|
|
3
|
return; |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
|
136
|
2
|
|
|
|
|
7
|
return $sym; |
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
sub decimal_precision { |
140
|
2
|
|
|
2
|
1
|
14
|
my ($code) = @_; |
141
|
|
|
|
|
|
|
|
142
|
2
|
50
|
|
|
|
10
|
if (!defined $code) { |
143
|
0
|
|
|
|
|
0
|
$::_error = 'Undefined currency code'; |
144
|
0
|
|
|
|
|
0
|
return; |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
2
|
|
|
|
|
5
|
my $cur = $currency{uc $code}; |
148
|
2
|
50
|
|
|
|
5
|
if (!$cur) { |
149
|
0
|
|
|
|
|
0
|
$::_error = 'Invalid currency code'; |
150
|
0
|
|
|
|
|
0
|
return; |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
|
153
|
2
|
|
|
|
|
4
|
my $precision = $cur->[$frac_len]; |
154
|
2
|
50
|
|
|
|
4
|
if (!$precision) { |
155
|
0
|
|
|
|
|
0
|
$::_error = 'Non-existant decimal precision'; |
156
|
0
|
|
|
|
|
0
|
return; |
157
|
|
|
|
|
|
|
} |
158
|
|
|
|
|
|
|
|
159
|
2
|
|
|
|
|
5
|
return $precision; |
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
sub decimal_separator { |
163
|
2
|
|
|
2
|
1
|
13
|
my ($code) = @_; |
164
|
|
|
|
|
|
|
|
165
|
2
|
50
|
|
|
|
9
|
if (!defined $code) { |
166
|
0
|
|
|
|
|
0
|
$::_error = 'Undefined currency code'; |
167
|
0
|
|
|
|
|
0
|
return; |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
|
170
|
2
|
|
|
|
|
5
|
my $cur = $currency{uc $code}; |
171
|
2
|
50
|
|
|
|
4
|
if (!$cur) { |
172
|
0
|
|
|
|
|
0
|
$::_error = 'Invalid currency code'; |
173
|
0
|
|
|
|
|
0
|
return; |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
2
|
|
|
|
|
4
|
my $separator = $cur->[$dec_sep]; |
177
|
2
|
50
|
|
|
|
5
|
if (!$separator) { |
178
|
0
|
|
|
|
|
0
|
$::_error = 'Non-existant decimal separator'; |
179
|
0
|
|
|
|
|
0
|
return; |
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
|
182
|
2
|
|
|
|
|
5
|
return $separator; |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
sub thousands_separator { |
186
|
2
|
|
|
2
|
1
|
12
|
my ($code) = @_; |
187
|
|
|
|
|
|
|
|
188
|
2
|
50
|
|
|
|
6
|
if (!defined $code) { |
189
|
0
|
|
|
|
|
0
|
$::_error = 'Undefined currency code'; |
190
|
0
|
|
|
|
|
0
|
return; |
191
|
|
|
|
|
|
|
} |
192
|
|
|
|
|
|
|
|
193
|
2
|
|
|
|
|
3
|
my $cur = $currency{uc $code}; |
194
|
2
|
50
|
|
|
|
6
|
if (!$cur) { |
195
|
0
|
|
|
|
|
0
|
$::_error = 'Invalid currency code'; |
196
|
0
|
|
|
|
|
0
|
return; |
197
|
|
|
|
|
|
|
} |
198
|
|
|
|
|
|
|
|
199
|
2
|
|
|
|
|
3
|
my $separator = $cur->[$thou_sep]; |
200
|
2
|
50
|
|
|
|
3
|
if (!$separator) { |
201
|
0
|
|
|
|
|
0
|
$::_error = 'Non-existant thousands separator'; |
202
|
0
|
|
|
|
|
0
|
return; |
203
|
|
|
|
|
|
|
} |
204
|
|
|
|
|
|
|
|
205
|
2
|
|
|
|
|
5
|
return $separator; |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
sub currency_set { |
209
|
3
|
|
|
3
|
1
|
25
|
my ($code, $tmpl, $style) = @_; |
210
|
|
|
|
|
|
|
|
211
|
3
|
50
|
|
|
|
9
|
if (!$code) { |
212
|
0
|
|
|
|
|
0
|
$::_error = 'Undefined currency code'; |
213
|
0
|
|
|
|
|
0
|
return; |
214
|
|
|
|
|
|
|
} |
215
|
3
|
50
|
33
|
|
|
20
|
if ($tmpl |
|
|
|
66
|
|
|
|
|
216
|
|
|
|
|
|
|
and (!$style |
217
|
|
|
|
|
|
|
or !grep { $style == $_ } (FMT_SYMBOL, FMT_HTML, FMT_COMMON)) |
218
|
|
|
|
|
|
|
) { |
219
|
0
|
|
|
|
|
0
|
$::_error = 'Format must be of FMT_SYMBOL, FMT_HTML, FMT_COMMON'; |
220
|
0
|
|
|
|
|
0
|
return; |
221
|
|
|
|
|
|
|
} |
222
|
|
|
|
|
|
|
|
223
|
3
|
|
|
|
|
5
|
my $ucc = uc $code; |
224
|
3
|
|
|
|
|
7
|
my $cur = $currency{$ucc}; |
225
|
3
|
50
|
|
|
|
7
|
if (!$cur) { |
226
|
0
|
|
|
|
|
0
|
$::_error = 'Invalid currency code'; |
227
|
0
|
|
|
|
|
0
|
return; |
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
|
230
|
3
|
100
|
|
|
|
7
|
if (!$tmpl) { |
231
|
1
|
50
|
|
|
|
11
|
$currency{$ucc} = $original{$ucc} if $original{$ucc}; |
232
|
1
|
|
|
|
|
5
|
return $ucc; |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
2
|
50
|
66
|
|
|
41
|
if ($tmpl !~ m{ \A |
|
|
|
33
|
|
|
|
|
236
|
|
|
|
|
|
|
([^#]*) # 1 - preceding symbol (may contain space) |
237
|
|
|
|
|
|
|
\# # followed by a # |
238
|
|
|
|
|
|
|
([^#]+) # 2 - thousand separator |
239
|
|
|
|
|
|
|
\#{3} # followed by 3 #'s |
240
|
|
|
|
|
|
|
(?: # |
241
|
|
|
|
|
|
|
([^#]+) # 3 - decimal separator |
242
|
|
|
|
|
|
|
(\#+) # 4 - fractional |
243
|
|
|
|
|
|
|
)* # |
244
|
|
|
|
|
|
|
([^#]*) # 5 - trailing symbol (may contain space) |
245
|
|
|
|
|
|
|
\Z |
246
|
|
|
|
|
|
|
}xms |
247
|
|
|
|
|
|
|
or ($1 and $5) |
248
|
|
|
|
|
|
|
) { |
249
|
0
|
|
|
|
|
0
|
$::_error = 'Irregular currency format'; |
250
|
0
|
|
|
|
|
0
|
return; |
251
|
|
|
|
|
|
|
} |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
# Let's save an original copy if it has yet been done |
254
|
2
|
50
|
|
|
|
13
|
$original{$ucc} = [@$cur] unless $original{$ucc}; |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
# Set fields based on template |
257
|
2
|
100
|
66
|
|
|
18
|
$cur->[$pre] = $1 ? 1 : 0 if $1 or $5; |
|
|
50
|
|
|
|
|
|
258
|
2
|
|
|
|
|
8
|
$cur->[$thou_sep] = $2; |
259
|
2
|
|
33
|
|
|
8
|
$cur->[$dec_sep ] = $3 || $EMPTY; |
260
|
2
|
50
|
|
|
|
8
|
$cur->[$frac_len] = $4 ? length($4) : 0; |
261
|
2
|
50
|
66
|
|
|
14
|
if (($1 || $5) =~ m{\A (\s*) (.+) (\s*) \Z}xms) { |
262
|
2
|
|
66
|
|
|
9
|
$cur->[$space_sep] = $1 || $3; |
263
|
2
|
50
|
|
|
|
11
|
if ($style == FMT_SYMBOL) { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
264
|
0
|
|
|
|
|
0
|
$cur->[$utf_sym] = $2; |
265
|
|
|
|
|
|
|
} |
266
|
|
|
|
|
|
|
elsif ($style == FMT_HTML) { |
267
|
0
|
|
|
|
|
0
|
$cur->[$htm_sym] = $2; |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
elsif ($style == FMT_COMMON) { |
270
|
2
|
|
|
|
|
3
|
$cur->[$com_sym] = $2; |
271
|
|
|
|
|
|
|
} |
272
|
|
|
|
|
|
|
} |
273
|
2
|
|
|
|
|
5
|
return $ucc; |
274
|
|
|
|
|
|
|
} |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
# These functions are copied directly out of Number::Format due to a bug that |
277
|
|
|
|
|
|
|
# lets locale settings take higher precedence to user's specific manipulation. |
278
|
|
|
|
|
|
|
# In addition, this will exclude the unnecessary POSIX module used by |
279
|
|
|
|
|
|
|
# Number::Format. |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
sub round { |
282
|
8
|
|
|
8
|
0
|
12
|
my ($number, $precision) = @_; |
283
|
|
|
|
|
|
|
|
284
|
8
|
50
|
|
|
|
15
|
$precision = 2 unless defined $precision; |
285
|
8
|
50
|
|
|
|
15
|
$number = 0 unless defined $number; |
286
|
|
|
|
|
|
|
|
287
|
8
|
|
|
|
|
10
|
my $sign = $number <=> 0; |
288
|
8
|
|
|
|
|
10
|
my $multiplier = (10 ** $precision); |
289
|
8
|
|
|
|
|
10
|
my $result = abs($number); |
290
|
8
|
|
|
|
|
24
|
$result = int(($result * $multiplier) + .5000001) / $multiplier; |
291
|
8
|
50
|
|
|
|
16
|
$result = -$result if $sign < 0; |
292
|
8
|
|
|
|
|
13
|
return $result; |
293
|
|
|
|
|
|
|
} |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
sub format_number { |
296
|
8
|
|
|
8
|
0
|
17
|
my ($number, $precision, $trailing_zeroes, $ksep, $dsep) = @_; |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
# Set defaults and standardize number |
299
|
8
|
50
|
|
|
|
13
|
$precision = 2 unless defined $precision; |
300
|
8
|
50
|
|
|
|
14
|
$trailing_zeroes = 1 unless defined $trailing_zeroes; |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
# Handle negative numbers |
303
|
8
|
|
|
|
|
10
|
my $sign = $number <=> 0; |
304
|
8
|
50
|
|
|
|
14
|
$number = abs($number) if $sign < 0; |
305
|
8
|
|
|
|
|
17
|
$number = round($number, $precision); # round off $number |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
# Split integer and decimal parts of the number and add commas |
308
|
8
|
|
|
|
|
10
|
my $integer = int($number); |
309
|
8
|
|
|
|
|
7
|
my $decimal; |
310
|
|
|
|
|
|
|
# Note: In perl 5.6 and up, string representation of a number |
311
|
|
|
|
|
|
|
# automagically includes the locale decimal point. This way we |
312
|
|
|
|
|
|
|
# will detect the decimal part correctly as long as the decimal |
313
|
|
|
|
|
|
|
# point is 1 character. |
314
|
8
|
50
|
|
|
|
20
|
$decimal = substr($number, length($integer)+1) |
315
|
|
|
|
|
|
|
if (length($integer) < length($number)); |
316
|
8
|
50
|
|
|
|
16
|
$decimal = $EMPTY unless defined $decimal; |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
# Add trailing 0's if $trailing_zeroes is set. |
319
|
8
|
100
|
100
|
|
|
48
|
$decimal .= '0'x( $precision - length($decimal) ) |
320
|
|
|
|
|
|
|
if $trailing_zeroes && $precision > length($decimal); |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
# Add leading 0's so length($integer) is divisible by 3 |
323
|
8
|
50
|
|
|
|
30
|
$integer = '0'x(3 - (length($integer) % 3)).$integer |
324
|
|
|
|
|
|
|
unless length($integer) % 3 == 0; |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
# Split $integer into groups of 3 characters and insert commas |
327
|
8
|
|
|
|
|
36
|
$integer = join($ksep, grep {$_ ne $EMPTY} split(/(...)/, $integer)); |
|
32
|
|
|
|
|
56
|
|
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
# Strip off leading zeroes and/or comma |
330
|
8
|
|
|
|
|
56
|
$integer =~ s/^0+//; |
331
|
8
|
50
|
|
|
|
18
|
$integer = '0' if $integer eq $EMPTY; |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
# Combine integer and decimal parts and return the result. |
334
|
8
|
100
|
66
|
|
|
35
|
my $result = ((defined $decimal && length $decimal) ? |
335
|
|
|
|
|
|
|
join($dsep, $integer, $decimal) : |
336
|
|
|
|
|
|
|
$integer); |
337
|
|
|
|
|
|
|
|
338
|
8
|
50
|
|
|
|
22
|
return ($sign < 0) ? format_negative($result) : $result; |
339
|
|
|
|
|
|
|
} |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
sub format_negative { |
342
|
0
|
|
|
0
|
0
|
|
my($number, $format) = @_; |
343
|
0
|
0
|
|
|
|
|
$format = '-x' unless defined $format; |
344
|
0
|
|
|
|
|
|
$number =~ s/^-//; |
345
|
0
|
|
|
|
|
|
$format =~ s/x/$number/; |
346
|
0
|
|
|
|
|
|
return $format; |
347
|
|
|
|
|
|
|
} |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
#=========================================================================== |
352
|
|
|
|
|
|
|
# ISO 4217 and common world currency symbols |
353
|
|
|
|
|
|
|
#=========================================================================== |
354
|
|
|
|
|
|
|
# code => 0 1 2 3 4 5 6 7 8 |
355
|
|
|
|
|
|
|
# name frac_len thou_sep dec_sep space_sep utf_sym htm_sym com_sym pre |
356
|
|
|
|
|
|
|
%currency = ( |
357
|
|
|
|
|
|
|
AED => ["UAE Dirham",2,",","."," ",$EMPTY,$EMPTY,"Dhs.",1], |
358
|
|
|
|
|
|
|
AFA => ["Afghani",0,$EMPTY,$EMPTY,"\x{060B}","؋",,$EMPTY,$EMPTY], |
359
|
|
|
|
|
|
|
ALL => ["Lek",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
360
|
|
|
|
|
|
|
AMD => ["Armenian Dram",2,",",".","",$EMPTY,$EMPTY,"AMD",0], |
361
|
|
|
|
|
|
|
ANG => ["Antillian Guilder",2,".",","," ","\x{0192}","ƒ","NAf.",1], |
362
|
|
|
|
|
|
|
AON => ["New Kwanza",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
363
|
|
|
|
|
|
|
ARS => ["Argentine Peso",2,".",",","","\x{20B1}","₱","\$",1], |
364
|
|
|
|
|
|
|
ATS => ["Schilling",2,".",","," ",$EMPTY,$EMPTY,"öS",1], |
365
|
|
|
|
|
|
|
AUD => ["Australian Dollar",2," ",".","","\x{0024}","$","\$",1], |
366
|
|
|
|
|
|
|
AWG => ["Aruban Guilder",2,",","."," ","\x{0192}","ƒ","AWG",1], |
367
|
|
|
|
|
|
|
AZN => ["Azerbaijanian Manat",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,"m",$EMPTY], |
368
|
|
|
|
|
|
|
BAM => ["Convertible Marks",2,",",".","",$EMPTY,$EMPTY,"AZM",0], |
369
|
|
|
|
|
|
|
BBD => ["Barbados Dollar",2,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY], |
370
|
|
|
|
|
|
|
BDT => ["Taka",2,",","."," ",$EMPTY,$EMPTY,"Bt.",1], |
371
|
|
|
|
|
|
|
BEF => ["Belgian Franc",0,".",""," ","\x{20A3}","₣","BEF",1], |
372
|
|
|
|
|
|
|
BGN => ["Lev",2," ",","," ",$EMPTY,$EMPTY,"lv",0], |
373
|
|
|
|
|
|
|
BHD => ["Bahraini Dinar",3,",","."," ",$EMPTY,$EMPTY,"BD",1], |
374
|
|
|
|
|
|
|
BIF => ["Burundi Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
375
|
|
|
|
|
|
|
BMD => ["Bermudian Dollar",2,",",".","","\x{0024}","$","\$",1], |
376
|
|
|
|
|
|
|
BND => ["Brunei Dollar",2,",",".","","\x{0024}","$","\$",1], |
377
|
|
|
|
|
|
|
BOB => ["Bolivian Boliviano",2,",",".","",$EMPTY,$EMPTY,"Bs",1], |
378
|
|
|
|
|
|
|
BRL => ["Brazilian Real",2,".",","," ","\x{0052}\x{0024}","R\$","R\$",1], |
379
|
|
|
|
|
|
|
BSD => ["Bahamian Dollar",2,",",".","","\x{0024}","$","\$",1], |
380
|
|
|
|
|
|
|
BTN => ["Bhutan Ngultrum",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
381
|
|
|
|
|
|
|
BWP => ["Pula",2,",",".","",$EMPTY,$EMPTY,"P",1], |
382
|
|
|
|
|
|
|
BYR => ["Belarussian Ruble",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
383
|
|
|
|
|
|
|
BZD => ["Belize Dollar",2,",",".","","\x{0024}","$","\$",1], |
384
|
|
|
|
|
|
|
CAD => ["Canadian Dollar",2,",",".","","\x{0024}","$","\$",1], |
385
|
|
|
|
|
|
|
CDF => ["Franc Congolais",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
386
|
|
|
|
|
|
|
CHF => ["Swiss Franc",2,"'","."," ",$EMPTY,$EMPTY,"SFr.",1], |
387
|
|
|
|
|
|
|
CLP => ["Chilean Peso",0,".","","","\x{20B1}","₱","\$",1], |
388
|
|
|
|
|
|
|
CNY => ["Yuan Renminbi",2,",",".","","\x{5713}","圓","Y",1], |
389
|
|
|
|
|
|
|
COP => ["Colombian Peso",2,".",",","","\x{20B1}","₱","\$",1], |
390
|
|
|
|
|
|
|
CRC => ["Costa Rican Colon",2,".",","," ","\x{20A1}","₡","₡",1], |
391
|
|
|
|
|
|
|
CUP => ["Cuban Peso",2,",","."," ","\x{20B1}","₱","\$",1], |
392
|
|
|
|
|
|
|
CVE => ["Cape Verde Escudo",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
393
|
|
|
|
|
|
|
CYP => ["Cyprus Pound",2,".",",","","\x{00A3}","£","£",1], |
394
|
|
|
|
|
|
|
CZK => ["Czech Koruna",2,".",","," ",$EMPTY,$EMPTY,"Kc",0], |
395
|
|
|
|
|
|
|
DEM => ["Deutsche Mark",2,".",",","",$EMPTY,$EMPTY,"DM",0], |
396
|
|
|
|
|
|
|
DJF => ["Djibouti Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
397
|
|
|
|
|
|
|
DKK => ["Danish Krone",2,".",",","",$EMPTY,$EMPTY,"kr.",1], |
398
|
|
|
|
|
|
|
DOP => ["Dominican Peso",2,",","."," ","\x{20B1}","₱","\$",1], |
399
|
|
|
|
|
|
|
DZD => ["Algerian Dinar",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
400
|
|
|
|
|
|
|
ECS => ["Sucre",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
401
|
|
|
|
|
|
|
EEK => ["Kroon",2," ",","," ",$EMPTY,$EMPTY,"EEK",0], |
402
|
|
|
|
|
|
|
EGP => ["Egyptian Pound",2,",","."," ","\x{00A3}","£","L.E.",1], |
403
|
|
|
|
|
|
|
ERN => ["Nakfa",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
404
|
|
|
|
|
|
|
ESP => ["Spanish Peseta",0,".",""," ","\x{20A7}","₧","Ptas",0], |
405
|
|
|
|
|
|
|
ETB => ["Ethiopian Birr",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
406
|
|
|
|
|
|
|
EUR => ["Euro",2,".",",","","\x{20AC}","€","EUR",1], |
407
|
|
|
|
|
|
|
FIM => ["Markka",2," ",","," ",$EMPTY,$EMPTY,"mk",0], |
408
|
|
|
|
|
|
|
FJD => ["Fiji Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY], |
409
|
|
|
|
|
|
|
FKP => ["Pound",0,$EMPTY,$EMPTY,"","\x{00A3}","£",$EMPTY,$EMPTY], |
410
|
|
|
|
|
|
|
FRF => ["French Franc",2," ",","," ","\x{20A3}","₣","FRF",0], |
411
|
|
|
|
|
|
|
GBP => ["Pound Sterling",2,",",".","","\x{00A3}","£","£",1], |
412
|
|
|
|
|
|
|
GEL => ["Lari",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
413
|
|
|
|
|
|
|
GHS => ["Cedi",2,",",".","","\x{20B5}","₵","₵",1], |
414
|
|
|
|
|
|
|
GIP => ["Gibraltar Pound",2,",",".","","\x{00A3}","£","£",1], |
415
|
|
|
|
|
|
|
GMD => ["Dalasi",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
416
|
|
|
|
|
|
|
GNF => ["Guinea Franc",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
417
|
|
|
|
|
|
|
GRD => ["Drachma",2,".",","," ","\x{20AF}","₯","GRD",0], |
418
|
|
|
|
|
|
|
GTQ => ["Quetzal",2,",",".","",$EMPTY,$EMPTY,"Q.",1], |
419
|
|
|
|
|
|
|
GWP => ["Guinea-Bissau Peso",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
420
|
|
|
|
|
|
|
GYD => ["Guyana Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY], |
421
|
|
|
|
|
|
|
HKD => ["Hong Kong Dollar",2,",",".","","\x{0024}","$","HK\$",1], |
422
|
|
|
|
|
|
|
HNL => ["Lempira",2,",","."," ",$EMPTY,$EMPTY,"L",1], |
423
|
|
|
|
|
|
|
HRK => ["Kuna",2,".",","," ",$EMPTY,$EMPTY,"kn",0], |
424
|
|
|
|
|
|
|
HTG => ["Gourde",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
425
|
|
|
|
|
|
|
HUF => ["Forint",0,".",""," ",$EMPTY,$EMPTY,"Ft",0], |
426
|
|
|
|
|
|
|
IDR => ["Rupiah",0,".","","",$EMPTY,$EMPTY,"Rp.",1], |
427
|
|
|
|
|
|
|
IEP => ["Irish Pound",2,",",".","","\x{00A3}","£","£",1], |
428
|
|
|
|
|
|
|
ILS => ["New Israeli Sheqel",2,",","."," ","\x{20AA}","₪","NIS",0], |
429
|
|
|
|
|
|
|
INR => ["Indian Rupee",2,",",".","","\x{20A8}","₨","Rs.",1], |
430
|
|
|
|
|
|
|
IQD => ["Iraqi Dinar",3,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
431
|
|
|
|
|
|
|
IRR => ["Iranian Rial",2,",","."," ","\x{FDFC}","﷼","Rls",1], |
432
|
|
|
|
|
|
|
ISK => ["Iceland Krona",2,".",","," ",$EMPTY,$EMPTY,"kr",0], |
433
|
|
|
|
|
|
|
ITL => ["Italian Lira",0,".",""," ","\x{20A4}","₤","L.",1], |
434
|
|
|
|
|
|
|
JMD => ["Jamaican Dollar",2,",",".","","\x{0024}","$","\$",1], |
435
|
|
|
|
|
|
|
JOD => ["Jordanian Dinar",3,",","."," ",$EMPTY,$EMPTY,"JD",1], |
436
|
|
|
|
|
|
|
JPY => ["Yen",0,",","","","\x{00A5}","¥","¥",1], |
437
|
|
|
|
|
|
|
KES => ["Kenyan Shilling",2,",",".","",$EMPTY,$EMPTY,"Kshs.",1], |
438
|
|
|
|
|
|
|
KGS => ["Som",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
439
|
|
|
|
|
|
|
KHR => ["Riel",2,$EMPTY,$EMPTY,"","\x{17DB}","៛",$EMPTY,$EMPTY], |
440
|
|
|
|
|
|
|
KMF => ["Comoro Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
441
|
|
|
|
|
|
|
KPW => ["North Korean Won",0,$EMPTY,$EMPTY,"","\x{20A9}","₩",$EMPTY,$EMPTY], |
442
|
|
|
|
|
|
|
KRW => ["Won",0,",","","","\x{20A9}","₩","\\",1], |
443
|
|
|
|
|
|
|
KWD => ["Kuwaiti Dinar",3,",","."," ",$EMPTY,$EMPTY,"KD",1], |
444
|
|
|
|
|
|
|
KYD => ["Cayman Islands Dollar",2,",",".","","\x{0024}","$","\$",1], |
445
|
|
|
|
|
|
|
KZT => ["Tenge",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
446
|
|
|
|
|
|
|
LAK => ["Kip",0,$EMPTY,$EMPTY,"","\x{20AD}","₭",$EMPTY,$EMPTY], |
447
|
|
|
|
|
|
|
LBP => ["Lebanese Pound",0," ","","","\x{00A3}","£","L.L.",0], |
448
|
|
|
|
|
|
|
LKR => ["Sri Lanka Rupee",0,$EMPTY,$EMPTY,"","\x{0BF9}","௹",$EMPTY,$EMPTY], |
449
|
|
|
|
|
|
|
LRD => ["Liberian Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY], |
450
|
|
|
|
|
|
|
LSL => ["Lesotho Maloti",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
451
|
|
|
|
|
|
|
LTL => ["Lithuanian Litas",2," ",","," ",$EMPTY,$EMPTY,"Lt",0], |
452
|
|
|
|
|
|
|
LUF => ["Luxembourg Franc",0,"'",""," ","\x{20A3}","₣","F",0], |
453
|
|
|
|
|
|
|
LVL => ["Latvian Lats",2,",","."," ",$EMPTY,$EMPTY,"Ls",1], |
454
|
|
|
|
|
|
|
LYD => ["Libyan Dinar",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
455
|
|
|
|
|
|
|
MAD => ["Moroccan Dirham",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
456
|
|
|
|
|
|
|
MDL => ["Moldovan Leu",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
457
|
|
|
|
|
|
|
MGF => ["Malagasy Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
458
|
|
|
|
|
|
|
MKD => ["Denar",2,",","."," ",$EMPTY,$EMPTY,"MKD",0], |
459
|
|
|
|
|
|
|
MMK => ["Kyat",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
460
|
|
|
|
|
|
|
MNT => ["Tugrik",0,$EMPTY,$EMPTY,"","\x{20AE}","₮",$EMPTY,$EMPTY], |
461
|
|
|
|
|
|
|
MOP => ["Pataca",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
462
|
|
|
|
|
|
|
MRO => ["Ouguiya",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
463
|
|
|
|
|
|
|
MTL => ["Maltese Lira",2,",",".","","\x{20A4}","₤","Lm",1], |
464
|
|
|
|
|
|
|
MUR => ["Mauritius Rupee",0,",","","","\x{20A8}","₨","Rs",1], |
465
|
|
|
|
|
|
|
MVR => ["Rufiyaa",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
466
|
|
|
|
|
|
|
MWK => ["Kwacha",2,",",".","",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
467
|
|
|
|
|
|
|
MXN => ["Mexican Peso",2,",","."," ","\x{0024}","$","\$",1], |
468
|
|
|
|
|
|
|
MYR => ["Malaysian Ringgit",2,",",".","",$EMPTY,$EMPTY,"RM",1], |
469
|
|
|
|
|
|
|
MZN => ["Metical",2,".",","," ",$EMPTY,$EMPTY,"Mt",0], |
470
|
|
|
|
|
|
|
NAD => ["Namibian Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY], |
471
|
|
|
|
|
|
|
NGN => ["Naira",0,$EMPTY,$EMPTY,"","\x{20A6}","₦",$EMPTY,$EMPTY], |
472
|
|
|
|
|
|
|
NIO => ["Cordoba Oro",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
473
|
|
|
|
|
|
|
NLG => ["Netherlands Guilder",2,".",","," ","\x{0192}","ƒ","f",1], |
474
|
|
|
|
|
|
|
NOK => ["Norwegian Krone",2,".",","," ","kr","kr","kr",1], |
475
|
|
|
|
|
|
|
NPR => ["Nepalese Rupee",2,",","."," ","\x{20A8}","₨","Rs.",1], |
476
|
|
|
|
|
|
|
NZD => ["New Zealand Dollar",2,",",".","","\x{0024}","$","\$",1], |
477
|
|
|
|
|
|
|
OMR => ["Rial Omani",3,",","."," ","\x{FDFC}","﷼","RO",1], |
478
|
|
|
|
|
|
|
PAB => ["Balboa",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
479
|
|
|
|
|
|
|
PEN => ["Nuevo Sol",2,",","."," ","S/.","S/.","S/.",1], |
480
|
|
|
|
|
|
|
PGK => ["Kina",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
481
|
|
|
|
|
|
|
PHP => ["Philippine Peso",2,",",".","","\x{20B1}","₱","PHP",1], |
482
|
|
|
|
|
|
|
PKR => ["Pakistan Rupee",2,",",".","","\x{20A8}","₨","Rs.",1], |
483
|
|
|
|
|
|
|
PLN => ["Zloty",2," ",","," ",$EMPTY,$EMPTY,"zl",0], |
484
|
|
|
|
|
|
|
PTE => ["Portuguese Escudo",0,".",""," ",$EMPTY,$EMPTY,"Esc",0], |
485
|
|
|
|
|
|
|
PYG => ["Guarani",0,$EMPTY,$EMPTY,"","\x{20B2}","₲","Gs.",$EMPTY], |
486
|
|
|
|
|
|
|
QAR => ["Qatari Rial",0,$EMPTY,$EMPTY,"","\x{FDFC}","﷼",$EMPTY,$EMPTY], |
487
|
|
|
|
|
|
|
RON => ["Leu",2,".",","," ",$EMPTY,$EMPTY,"lei",0], |
488
|
|
|
|
|
|
|
RSD => ["Serbian Dinar",2,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,"din",0], |
489
|
|
|
|
|
|
|
RUB => ["Russian Ruble",2,".",",",$EMPTY,"\x{0440}\x{0443}\x{0431}","руб","RUB",1], |
490
|
|
|
|
|
|
|
RWF => ["Rwanda Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
491
|
|
|
|
|
|
|
SAC => ["S. African Rand Commerc.",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
492
|
|
|
|
|
|
|
SAR => ["Saudi Riyal",2,",","."," ","\x{FDFC}","﷼","SR",1], |
493
|
|
|
|
|
|
|
SBD => ["Solomon Islands Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY], |
494
|
|
|
|
|
|
|
SCR => ["Seychelles Rupee",0,$EMPTY,$EMPTY,"","\x{20A8}","₨",$EMPTY,$EMPTY], |
495
|
|
|
|
|
|
|
SDG => ["Sudanese Dinar",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,"LSd",$EMPTY], |
496
|
|
|
|
|
|
|
SDP => ["Sudanese Pound",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
497
|
|
|
|
|
|
|
SEK => ["Swedish Krona",2," ",","," ",$EMPTY,$EMPTY,"kr",0], |
498
|
|
|
|
|
|
|
SGD => ["Singapore Dollar",2,",",".","","\x{0024}","$","\$",1], |
499
|
|
|
|
|
|
|
SHP => ["St Helena Pound",0,$EMPTY,$EMPTY,"","\x{00A3}","£",$EMPTY,$EMPTY], |
500
|
|
|
|
|
|
|
SIT => ["Tolar",2,".",","," ",$EMPTY,$EMPTY,"SIT",0], |
501
|
|
|
|
|
|
|
SKK => ["Slovak Koruna",2," ",","," ",$EMPTY,$EMPTY,"Sk",0], |
502
|
|
|
|
|
|
|
SLL => ["Leone",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
503
|
|
|
|
|
|
|
SOS => ["Somali Shilling",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
504
|
|
|
|
|
|
|
SRG => ["Surinam Guilder",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
505
|
|
|
|
|
|
|
STD => ["Dobra",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
506
|
|
|
|
|
|
|
SVC => ["El Salvador Colon",2,",",".","","\x{20A1}","₡","¢",1], |
507
|
|
|
|
|
|
|
SYP => ["Syrian Pound",0,$EMPTY,$EMPTY,"","\x{00A3}","£",$EMPTY,$EMPTY], |
508
|
|
|
|
|
|
|
SZL => ["Lilangeni",2,"",".","",$EMPTY,$EMPTY,"E",1], |
509
|
|
|
|
|
|
|
THB => ["Baht",2,",","."," ","\x{0E3F}","฿","Bt",0], |
510
|
|
|
|
|
|
|
TJR => ["Tajik Ruble",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
511
|
|
|
|
|
|
|
TJS => ["Somoni",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
512
|
|
|
|
|
|
|
TMM => ["Manat",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
513
|
|
|
|
|
|
|
TND => ["Tunisian Dinar",3,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
514
|
|
|
|
|
|
|
TOP => ["Pa'anga",2,",","."," ",$EMPTY,$EMPTY,"\$",1], |
515
|
|
|
|
|
|
|
TPE => ["Timor Escudo",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
516
|
|
|
|
|
|
|
TRY => ["Turkish Lira",0,",","","","\x{20A4}","₤","TL",0], |
517
|
|
|
|
|
|
|
TTD => ["Trinidad and Tobago Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY], |
518
|
|
|
|
|
|
|
TWD => ["New Taiwan Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY], |
519
|
|
|
|
|
|
|
TZS => ["Tanzanian Shilling",2,",","."," ",$EMPTY,$EMPTY,"TZs",0], |
520
|
|
|
|
|
|
|
UAH => ["Hryvnia",2," ",",","","\x{20B4}","₴",$EMPTY,0], |
521
|
|
|
|
|
|
|
UGX => ["Uganda Shilling",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
522
|
|
|
|
|
|
|
USD => ["US Dollar",2,",",".","","\x{0024}","$","\$",1], |
523
|
|
|
|
|
|
|
UYU => ["Peso Uruguayo",2,".",",","","\x{20B1}","₱","\$",1], |
524
|
|
|
|
|
|
|
UZS => ["Uzbekistan Sum",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
525
|
|
|
|
|
|
|
VEF => ["Bolivar",2,".",","," ",$EMPTY,$EMPTY,"Bs.F",1], |
526
|
|
|
|
|
|
|
VND => ["Dong",2,".",","," ","\x{20AB}","₫","Dong",0], |
527
|
|
|
|
|
|
|
VUV => ["Vatu",0,",","","",$EMPTY,$EMPTY,"VT",0], |
528
|
|
|
|
|
|
|
WST => ["Tala",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
529
|
|
|
|
|
|
|
XAF => ["CFA Franc BEAC",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
530
|
|
|
|
|
|
|
XCD => ["East Caribbean Dollar",2,",",".","","\x{0024}","$","\$",1], |
531
|
|
|
|
|
|
|
XOF => ["CFA Franc BCEAO",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
532
|
|
|
|
|
|
|
XPF => ["CFP Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
533
|
|
|
|
|
|
|
YER => ["Yemeni Rial",0,$EMPTY,$EMPTY,"","\x{FDFC}","﷼",$EMPTY,$EMPTY], |
534
|
|
|
|
|
|
|
YUN => ["New Dinar",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
535
|
|
|
|
|
|
|
ZAR => ["Rand",2," ","."," ","\x{0052}","R","R",1], |
536
|
|
|
|
|
|
|
ZMK => ["Kwacha",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
537
|
|
|
|
|
|
|
ZRN => ["New Zaire",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY], |
538
|
|
|
|
|
|
|
ZWD => ["Zimbabwe Dollar ",2," ",".","","\x{0024}","$","Z\$",1], |
539
|
|
|
|
|
|
|
); |
540
|
|
|
|
|
|
|
|
541
|
|
|
|
|
|
|
|
542
|
|
|
|
|
|
|
1; |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
__END__ |