Re: about locale settings
| From: | Per Jessen | Date: | Tue, 16 Jun 2009 16:51:54 +0000 |
| Subject: | Re: about locale settings | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294109@lists.php.net to get a copy of this message | ||
Per Jessen wrote:
> When I've set LC_ALL before calling php, why do I need to call
> setlocale() in the script too:
>
> LC_ALL=de_DE.utf8 php -r "print strftime('%B');"
> June
>
> LC_ALL=de_DE.utf8 php -r "setlocale(LC_ALL,''); print
> strftime('%B');"
> Juni
>
> What am I missing here? I have no problem with the
> setlocale(LC_ALL,'') call, but I'd like to understand why I need it.
Am I the only one to run into these oddball problems? Doesn't anyone
else use different locales? I think the above is a bug - php _should_
respect the LC_ALL setting without being specifically poked.
/Per
--
Per Jessen, Zürich (20.9°C)