note 62851 added to function.setlocale

From: Date: Fri, 10 Mar 2006 20:37:17 +0000
Subject: note 62851 added to function.setlocale
Groups: php.notes 
Request: Send a blank email to php-notes+get-105241@lists.php.net to get a copy of this message
Apparently on FreeBSD locale support is not so great. There can be problems setting the locale. For example, <? setlocale (LC_TIME,"pt_BR"); ?> at first didn't work for me. Command to list all locales on the system... locale -a ...which showed (in my case) that my needed locale was present, but with the charset appended to the locale name. ( ie: pt_BR.ISO8859-1, pt_BR.UTF-8 ) These locales are usually in folders at /usr/share/locale/ What I did to resolve the problem was create a symbolic link: ln -s /usr/share/locale/pt_BR.ISO8859-1 /usr/share/locale/pt_BR And it worked. There will probably be problems with pages with different encodings, so perhaps there's a better way, but if not, hope this is a help to someone. ---- Server IP: 66.163.161.117 Probable Submitter: 201.6.107.99 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.setlocale.php Edit -- http://master.php.net/note/edit/62851 Del: integrated -- http://master.php.net/note/delete/62851/integrated Del: useless -- http://master.php.net/note/delete/62851/useless Del: bad code -- http://master.php.net/note/delete/62851/bad+code Del: spam -- http://master.php.net/note/delete/62851/spam Del: non-english -- http://master.php.net/note/delete/62851/non-english Del: in docs -- http://master.php.net/note/delete/62851/in+docs Del: other reasons-- http://master.php.net/note/delete/62851 Reject -- http://master.php.net/note/reject/62851 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#105241) next »