|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-26 12:39 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 02:00:01 2025 UTC |
/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