note 84719 added to function.setlocale
| From: | michal dot kocarek at brainbox dot cz | Date: | Sun, 27 Jul 2008 15:33:23 +0000 |
| Subject: | note 84719 added to function.setlocale | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-142810@lists.php.net to get a copy of this message | ||
Note about using UTF-8 locale charset on Windows systems:
According to MSDN, Windows setlocale()'s implementation does not support UTF-8 encoding.
Citation from "MSDN setlocale, _wsetlocale" page
(http://msdn.microsoft.com/en-us/library/x99tb11d.aspx):
The set of available languages, country/region codes, and code pages includes all those supported by
the Win32 NLS API except code pages that require more than two bytes per character, such as UTF-7
and UTF-8. If you provide a code page like UTF-7 or UTF-8, setlocale will fail, returning NULL.
So basically, code like
<? setlocale(LC_ALL, 'Czech_Czech Republic.65001'); // 65001 is UTF-8 codepage ?>
does not work on Windows at all.
(written in time of PHP 5.2.4)
----
Server IP: 212.24.129.51
Probable Submitter: 89.24.114.17
----
Manual Page -- http://www.php.net/manual/en/function.setlocale.php
Edit -- https://master.php.net/note/edit/84719
Del: integrated -- https://master.php.net/note/delete/84719/integrated
Del: useless -- https://master.php.net/note/delete/84719/useless
Del: bad code -- https://master.php.net/note/delete/84719/bad+code
Del: spam -- https://master.php.net/note/delete/84719/spam
Del: non-english -- https://master.php.net/note/delete/84719/non-english
Del: in docs -- https://master.php.net/note/delete/84719/in+docs
Del: other reasons-- https://master.php.net/note/delete/84719
Reject -- https://master.php.net/note/reject/84719
Search -- https://master.php.net/manage/user-notes.php