Is there a reason why PHP loses all local information after connecting to DB2 with PDO?
I always need to set local information again after connecting.
<?PHP //set locale information setlocale( LC_MONETARY,'en_US' ); //print location information print_r(localeconv()); // Array // ( // [decimal_point] => . // [thousands_sep] => // [int_curr_symbol] => USD // [currency_symbol] => $ // [mon_decimal_point] => . // [mon_thousands_sep] => , // ... // ) //************************************************ //create conenction to server $connection= new PDO("odbc:server", 'username', 'password'); //************************************************ //see locale information after creating a connection print_r(localeconv()); // Array // ( // [decimal_point] => . // [thousands_sep] => // [int_curr_symbol] => // [currency_symbol] => // [mon_decimal_point] => // [mon_thousands_sep] => // ... // // ) ?>
source share