From:             js9s at lycos dot com
Operating system: LINUX
PHP version:      4.3.3
PHP Bug Type:     *Languages/Translation
Bug description:  setlocale has bugs

Description:
------------
setlocale works only partially.

Following code won't work:

$ulang="zh_CN";
$ulang_1=$ulang;
putenv ("LC_ALL=$ulang_1");
$locale=setlocale(LC_ALL,$ulang_1);

The $locale is always null;

However, following works:

$ulang="zh_CN";
putenv ("LC_ALL=$ulang");
$locale=setlocale(LC_ALL,$ulang);

where $locale returns correct "zh_CN"







-- 
Edit bug report at http://bugs.php.net/?id=26708&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26708&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26708&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26708&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26708&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26708&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26708&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26708&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26708&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26708&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26708&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26708&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26708&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26708&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26708&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26708&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26708&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26708&r=float

Reply via email to