note 117529 added to function.setlocale

From: Date: Thu, 25 Jun 2015 01:05:28 +0000
Subject: note 117529 added to function.setlocale
Groups: php.notes 
Request: Send a blank email to php-notes+get-202943@lists.php.net to get a copy of this message
For Windows users complaining about setlocale. The locale argument to the setlocale function takes the following form: setlocale( LC_ALL, "<language>_<country>.<code_page>" ); in short, if you want use for example: es_CO.UTF-8 it must be in Windows: Spanish_Colombia.1252 The code page 1252 is ISO-8859-1 (windows-1252 ANSI Latin 1; Western European (Windows) Windows use different languages code from Unix, for example, es_CO becomes es-CO or Spanish_Colombia, also it doesn't support UTF-8 charset as is shown in their website: https://msdn.microsoft.com/en-us/library/x99tb11d(v=vs.140).aspx "The set of available locale names, languages, country/region codes, and code pages includes all those supported by the Windows 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 value of UTF-7 or UTF-8, setlocale will fail, returning NULL." Please check the updated website of language and code pages: https://msdn.microsoft.com/en-us/library/39cwe7zf(v=vs.140).aspx and https://msdn.microsoft.com/en-us//goglobal/bb895996 Here a copy paste in case the link is removed: Afrikaans Albanian Arabic_Saudi_Arabia Arabic_Iraq Arabic_Egypt Arabic_Libya Arabic_Algeria Arabic_Morocco Arabic_Tunisia Arabic_Oman Arabic_Yemen Arabic_Syria Arabic_Jordan Arabic_Lebanon Arabic_Kuwait Arabic_UAE Arabic_Bahrain Arabic_Qatar Armenian Azeri_Latin Azeri_Cyrillic Basque Belarusian Bengali_India Bosnian_Latin Bulgarian Catalan Chinese_Taiwan Chinese_PRC Chinese_Hong_Kong Chinese_Singapore Chinese_Macau Croatian Croatian_Bosnia_Herzegovina Czech Danish Divehi Dutch_Standard Dutch_Belgian English_United_States English_United_Kingdom English_Australian English_Canadian English_New_Zealand English_Ireland English_South_Africa English_Jamaica English_Caribbean English_Belize English_Trinidad English_Zimbabwe English_Philippines Estonian Faeroese Farsi Finnish French_Standard French_Belgian French_Canadian French_Swiss French_Luxembourg French_Monaco Georgian Galician German_Standard German_Swiss German_Austrian German_Luxembourg German_Liechtenstein Greek Gujarati Hebrew Hindi Hungarian Icelandic Indonesian Italian_Standard Italian_Swiss Japanese Kannada Kazakh Konkani Korean Kyrgyz Latvian Lithuanian Macedonian Malay_Malaysia Malay_Brunei_Darussalam Malayalam Maltese Maori Marathi Mongolian Norwegian_Bokmal Norwegian_Nynorsk Polish Portuguese_Brazilian Portuguese_Standard Punjabi Quechua_Bolivia Quechua_Ecuador Quechua_Peru Romanian Russian Sami_Inari Sami_Lule_Norway Sami_Lule_Sweden Sami_Northern_Finland Sami_Northern_Norway Sami_Northern_Sweden Sami_Skolt Sami_Southern_Norway Sami_Southern_Sweden Sanskrit Serbian_Latin Serbian_Latin_Bosnia_Herzegovina Serbian_Cyrillic Serbian_Cyrillic_Bosnia_Herzegovina Slovak Slovenian Spanish_Traditional_Sort Spanish_Mexican Spanish_Modern_Sort Spanish_Guatemala Spanish_Costa_Rica Spanish_Panama Spanish_Dominican_Republic Spanish_Venezuela Spanish_Colombia Spanish_Peru Spanish_Argentina Spanish_Ecuador Spanish_Chile Spanish_Uruguay Spanish_Paraguay Spanish_Bolivia Spanish_El_Salvador Spanish_Honduras Spanish_Nicaragua Spanish_Puerto_Rico Swahili Swedish Swedish_Finland Syriac Tamil Tatar Telugu Thai Tswana Ukrainian Turkish Ukrainian Urdu Uzbek_Latin Uzbek_Cyrillic Vietnamese Welsh Xhosa Zulu The code pages identifiers: https://msdn.microsoft.com/en-us/library/windows/desktop/dd317756(v=vs.85).aspx ---- Server IP: 72.52.91.14 Probable Submitter: 186.82.219.131 ---- Manual Page -- http://php.net/manual/en/function.setlocale.php Edit -- https://master.php.net/note/edit/117529 Del: integrated -- https://master.php.net/note/delete/117529/integrated Del: useless -- https://master.php.net/note/delete/117529/useless Del: bad code -- https://master.php.net/note/delete/117529/bad+code Del: spam -- https://master.php.net/note/delete/117529/spam Del: non-english -- https://master.php.net/note/delete/117529/non-english Del: in docs -- https://master.php.net/note/delete/117529/in+docs Del: other reasons-- https://master.php.net/note/delete/117529 Reject -- https://master.php.net/note/reject/117529 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#202943) next »