#23363 [Bgs]: setlocale() not working

From: Date: Sat, 26 Apr 2003 21:04:45 +0000
Subject: #23363 [Bgs]: setlocale() not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38474@lists.php.net to get a copy of this message
ID: 23363 User updated by: bmansion at mamasam dot com Reported By: bmansion at mamasam dot com Status: Bogus Bug Type: *Languages/Translation Operating System: Mac OSX 10.2.4 PHP Version: 4.3.2RC1 New Comment: /usr/share/locale/fr_FR.ISO8859-1 has LC_CTYPE. Apparently, it is possible to use at least LC_CTYPE, ht://dig does it [1] But this code won't work: setlocale(LC_CTYPE, 'fr_FR.ISO8859-1'); // or setlocale(LC_CTYPE, 'fr_FR'); $words = $nonwords = ''; for ($i=0; $i < 255; $i++) { if (ctype_alnum(chr($i))) { $words .= chr($i); } else { $nonwords .= chr($i); } } It behaves like 'C' locale. [1] http://www.stepwise.com/Articles/Workbench/2002-11- 01.01.html Previous Comments: ------------------------------------------------------------------------ [2003-04-26 13:27:42] msopacua@php.net Use 'fr_FR', since there is no: /usr/share/locale/fr/LC_CTYPE. LC_ALL doesn't work at all on Mac OSX, as far as I can tell (not only in PHP, but in C also). ------------------------------------------------------------------------ [2003-04-26 12:39:55] bmansion at mamasam dot com Ex : setlocale(LC_CTYPE, 'fr'); This does not work with MacOSX, LC_ALL neither. Locale can be found in /usr/share/locale/, they are installed by default. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23363&edit=1

« previous php.bugs (#38474) next »