Problem with PHP localeconv() - Maybe UTF-8

Posted by Chuck Ugwuh on Stack Overflow See other posts from Stack Overflow or by Chuck Ugwuh
Published on 2010-05-14T17:17:15Z Indexed on 2010/05/15 20:44 UTC
Read the original article Hit count: 139

Filed under:
|

I'm having an issue with the localeconv() in PHP. I'm using a Windows PC.

I set my locale to France using setLocale(LC_ALL, 'fra_fra') function. Then I call the localeconv() function to a variable. When I output that variable, below is what I get.


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
        )

)

I'm not sure if it is a UTF-8 display issue. I've done the following:

  1. Set my default_charset in PHP.ini to UTF-8
  2. The Content-type on my page is UTF-8
  3. I've also called same in a header i.e. header('Content-type: text/html; charset=utf-8')
  4. I'm using firefox and changed the charset there too, still no luck
  5. I also updated my http.conf file with AddDefaultCharset, but still no cigar

I'm completely stumped and not sure what next to do.

Can anyone help out?

Thanks.

© Stack Overflow or respective owner

Related posts about utf-8

Related posts about php