note 62851 deleted from function.setlocale by nlopess

From: Date: Wed, 24 Jan 2007 11:01:04 +0000
Subject: note 62851 deleted from function.setlocale by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-122127@lists.php.net to get a copy of this message
Note Submitter: jobcello at gmail dot com ---- 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.

« previous php.notes (#122127) next »