【发布时间】:2010-05-14 17:17:15
【问题描述】:
我在 PHP 中遇到了 localeconv() 的问题。我使用的是 Windows PC。
我使用setLocale(LC_ALL, 'fra_fra') 函数将我的语言环境设置为法国。然后我将localeconv() 函数调用为一个变量。当我输出那个变量时,下面是我得到的。
Array
(
[decimal_point] => ,
[thousands_sep] => �
[int_curr_symbol] => EUR
[currency_symbol] => �
[mon_decimal_point] => ,
[mon_thousands_sep] => �
[positive_sign] =>
[negative_sign] => -
[int_frac_digits] => 2
[frac_digits] => 2
[p_cs_precedes] => 0
[p_sep_by_space] => 1
[n_cs_precedes] => 0
[n_sep_by_space] => 1
[p_sign_posn] => 1
[n_sign_posn] => 1
[grouping] => Array
(
[0] => 3
)
[mon_grouping] => Array
(
[0] => 3
)
)
我不确定这是否是 UTF-8 显示问题。我做了以下事情:
- 将 PHP.ini 中的 default_charset 设置为 UTF-8
- 我页面上的 Content-type 是 UTF-8
- 我也在标题中调用了相同的名称,即
header('Content-type: text/html; charset=utf-8') - 我正在使用 firefox 并在那里更改了字符集,但仍然没有运气
- 我还用
AddDefaultCharset更新了我的 http.conf 文件,但仍然没有雪茄
我完全被难住了,不知道下一步该怎么做。
有人可以帮忙吗?
谢谢。
【问题讨论】:
-
试试“fr_FR”或“fr_FR.UTF-8”...