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