ID: 25697
Updated by: [EMAIL PROTECTED]
Reported By: joho at webbplatsen dot se
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: SuSE Linux 8.x, 2.4.19-4GB kerne
PHP Version: 4.3.3
New Comment:
Try
$ locale -a | grep "sv_SV"
to see if your system supports that locale.
Previous Comments:
------------------------------------------------------------------------
[2003-09-29 18:07:00] joho at webbplatsen dot se
Description:
------------
After upgrading our system to PHP 4.3.2, setlocate() no longer seemed
to have any effect. I later upgraded to PHP 4.3.3 but find the same
problem present. No compile-time problems are reported.
Uppercase/lowercase of Swedish national characters no longer works
either.
Reproduce code:
---------------
Code from the PHP manual (fails):
/* Set locale to Dutch */
setlocale (LC_ALL, 'nl_NL');
/* Output: vrijdag 22 december 1978 */
echo strftime ("%A %e %B %Y", mktime (0, 0, 0, 12, 22, 1978));
/* try different possible locale names for german as of PHP 4.3.0 */
$loc_de = setlocale (LC_ALL, '[EMAIL PROTECTED]', 'de_DE', 'de', 'ge');
echo "Preferred locale for german on this system is '$loc_de'";
Own code (fails):
setlocale (LC_ALL, 'sv_SV');
return
(
ucfirst (strftime ("%a")) .
" " .
date ("Y-m-d") .
" ".
"V." .
strftime ("%V")
);
Expected result:
----------------
Own code should result in this:
Tis 2003-09-30 V.40
(if run on 2003-09-30, that is ;)
Actual result:
--------------
Tue 2003-09-30 V.40
And no, I am not certain I have not done something wrong, but since
this behavior changed after we installed 4.3.2.. ???
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25697&edit=1