diff --git a/include/winnls.h b/include/winnls.h index 3526613df5d..45eb8bfa7f5 100644 --- a/include/winnls.h +++ b/include/winnls.h @@ -315,9 +315,10 @@ #define SUBLANG_SPANISH_URUGUAY 0x0e #define SUBLANG_SPANISH_PARAGUAY 0x0f #define SUBLANG_SPANISH_BOLIVIA 0x10 -#define SUBLANG_SPANISH_HONDURAS 0x11 -#define SUBLANG_SPANISH_NICARAGUA 0x12 -#define SUBLANG_SPANISH_PUERTO_RICO 0x13 +#define SUBLANG_SPANISH_EL_SALVADOR 0x11 +#define SUBLANG_SPANISH_HONDURAS 0x12 +#define SUBLANG_SPANISH_NICARAGUA 0x13 +#define SUBLANG_SPANISH_PUERTO_RICO 0x14 /* FIXME: I don't know the symbolic names for those */ #define SUBLANG_ROMANIAN 0x01 #define SUBLANG_ROMANIAN_MOLDAVIA 0x02 diff --git a/ole/nls/README b/ole/nls/README index 8fe9b0f0d1a..bb9d18f716b 100644 --- a/ole/nls/README +++ b/ole/nls/README @@ -8,9 +8,8 @@ and LOCALE_IDEFAULTANSICODEPAGE use decimal. I'll appreciate info on the others numeric fields; and a confirmation about the numeric fields I told above. -I have also doubts for the alphanumeric fields; what character encoding -should be used for non ascii strings ? DOS code page ? Windows code page ? -Unix standard encoding (what I did until now) ? Unicode ? +For the alphanumeric fields the encoding used is the one used by MS-Windows +for that language (the one in LOCALE_IDEFAULTANSICODEPAGE). -- diff --git a/ole/nls/cze.nls b/ole/nls/cze.nls index 387e7748a3d..240dc5fcffc 100644 --- a/ole/nls/cze.nls +++ b/ole/nls/cze.nls @@ -1,7 +1,7 @@ /* * OLE2NLS library * Czech Republic - * (Czech strings in iso-8859-2) + * (Czech strings in cp1250) */ LOCVAL(LOCALE_ILANGUAGE,"0405") diff --git a/ole/nls/ese.nls b/ole/nls/ese.nls index 686a5f8fcb4..5cab2a98410 100644 --- a/ole/nls/ese.nls +++ b/ole/nls/ese.nls @@ -2,7 +2,7 @@ * OLE2NLS library * Spanish (El Salvador) * - * (spanish strings in iso-8859-1) + * (spanish strings in cp1252) */ LOCVAL(LOCALE_ILANGUAGE,"440a") diff --git a/ole/nls/esg.nls b/ole/nls/esg.nls index 1206769947d..e9ac7c2a19c 100644 --- a/ole/nls/esg.nls +++ b/ole/nls/esg.nls @@ -1,7 +1,7 @@ /* * OLE2NLS library * Spanish (Guatemala) - * (spanish strings in iso-8859-1) + * (spanish strings in cp1252) */ LOCVAL(LOCALE_ILANGUAGE,"100a") diff --git a/ole/nls/est.nls b/ole/nls/est.nls index b7d38cb721c..0fcb41906a3 100644 --- a/ole/nls/est.nls +++ b/ole/nls/est.nls @@ -2,7 +2,7 @@ * OLE2NLS library * Estonia * - * (estonian strings in iso-8859-15) + * (estonian strings in cp1252) */ LOCVAL(LOCALE_ILANGUAGE,"0425") diff --git a/ole/nls/euq.nls b/ole/nls/euq.nls index 9bf449fca60..94279a4c6ba 100644 --- a/ole/nls/euq.nls +++ b/ole/nls/euq.nls @@ -1,6 +1,8 @@ /* * OLE2NLS library * Basque + * + * email: srtxg@chanae.alphanet.ch */ LOCVAL(LOCALE_ILANGUAGE,"042d") diff --git a/ole/nls/fos.nls b/ole/nls/fos.nls index de292c66a93..641509d7c31 100644 --- a/ole/nls/fos.nls +++ b/ole/nls/fos.nls @@ -2,7 +2,7 @@ * OLE2NLS library * Faroe Islands * - * (faroese strings in iso-8859-1) + * (faroese strings in cp1252) */ LOCVAL(LOCALE_ILANGUAGE,"0438") diff --git a/ole/nls/hrv.nls b/ole/nls/hrv.nls index e5afa263c03..220388989d1 100644 --- a/ole/nls/hrv.nls +++ b/ole/nls/hrv.nls @@ -1,7 +1,7 @@ /* * OLE2NLS library * Croatia - * (Croatian strings in iso-8859-2) + * (Croatian strings in cp1250) */ LOCVAL(LOCALE_ILANGUAGE,"041a") diff --git a/ole/nls/hun.nls b/ole/nls/hun.nls index 18665b9767e..8df129a93db 100644 --- a/ole/nls/hun.nls +++ b/ole/nls/hun.nls @@ -1,7 +1,7 @@ /* * OLE2NLS library * Hungarian - * (Hungarian strings in iso-8859-2) + * (Hungarian strings in cp1250) */ LOCVAL(LOCALE_ILANGUAGE,"040e") diff --git a/ole/nls/isl.nls b/ole/nls/isl.nls index 9b94ebf6cc6..a087c92c4d8 100644 --- a/ole/nls/isl.nls +++ b/ole/nls/isl.nls @@ -1,7 +1,7 @@ /* * OLE2NLS library * Iceland - * (Icelandic strings in iso-8859-1) + * (Icelandic strings in cp1252) */ LOCVAL(LOCALE_ILANGUAGE,"040f") diff --git a/ole/nls/nor.nls b/ole/nls/nor.nls index 917195edad2..0a6633427c7 100644 --- a/ole/nls/nor.nls +++ b/ole/nls/nor.nls @@ -1,7 +1,7 @@ /* * OLE2NLS library * Norway (Bokmaal) - * (Norwegian strings in iso-8859-1) + * (Norwegian strings in cp1252) */ LOCVAL(LOCALE_ILANGUAGE,"0414") diff --git a/ole/nls/plk.nls b/ole/nls/plk.nls index eae454a0826..b81bfee1d2e 100644 --- a/ole/nls/plk.nls +++ b/ole/nls/plk.nls @@ -1,7 +1,7 @@ /* * OLE2NLS library * Poland - * (Polish strings in iso-8859-2) + * (Polish strings in cp1250) */ LOCVAL(LOCALE_ILANGUAGE,"0415") @@ -58,9 +58,9 @@ LOCVAL(LOCALE_ICALENDARTYPE, "1") LOCVAL(LOCALE_SDAYNAME1,"Poniedzia\263ek") LOCVAL(LOCALE_SDAYNAME2,"Wtorek") -LOCVAL(LOCALE_SDAYNAME3,"Środa") +LOCVAL(LOCALE_SDAYNAME3,"\214roda") LOCVAL(LOCALE_SDAYNAME4,"Czwartek") -LOCVAL(LOCALE_SDAYNAME5,"Piątek") +LOCVAL(LOCALE_SDAYNAME5,"Pi\271tek") LOCVAL(LOCALE_SDAYNAME6,"Sobota") LOCVAL(LOCALE_SDAYNAME7,"Niedziela") @@ -81,7 +81,7 @@ LOCVAL(LOCALE_SMONTHNAME6,"Czerwiec") LOCVAL(LOCALE_SMONTHNAME7,"Lipiec") LOCVAL(LOCALE_SMONTHNAME8,"Sierpie\xF1") LOCVAL(LOCALE_SMONTHNAME9,"Wrzesie\xF1") -LOCVAL(LOCALE_SMONTHNAME10,"Październik") +LOCVAL(LOCALE_SMONTHNAME10,"Pa\237dziernik") LOCVAL(LOCALE_SMONTHNAME11,"Listapad") LOCVAL(LOCALE_SMONTHNAME12,"Grudzie\xF1") LOCVAL(LOCALE_SMONTHNAME13,"") @@ -95,7 +95,7 @@ LOCVAL(LOCALE_SABBREVMONTHNAME6,"Cze") LOCVAL(LOCALE_SABBREVMONTHNAME7,"Lip") LOCVAL(LOCALE_SABBREVMONTHNAME8,"Sie") LOCVAL(LOCALE_SABBREVMONTHNAME9,"Wrz") -LOCVAL(LOCALE_SABBREVMONTHNAME10,"Paź") +LOCVAL(LOCALE_SABBREVMONTHNAME10,"Pa\237") LOCVAL(LOCALE_SABBREVMONTHNAME11,"Lis") LOCVAL(LOCALE_SABBREVMONTHNAME12,"Gru") LOCVAL(LOCALE_SABBREVMONTHNAME13,"") diff --git a/ole/nls/ptg.nls b/ole/nls/ptg.nls index 199f6cd4306..9815ace8e97 100644 --- a/ole/nls/ptg.nls +++ b/ole/nls/ptg.nls @@ -2,7 +2,7 @@ * OLE2NLS library * Portugal * - * (portuguese strings in iso-8859-1) + * (portuguese strings in cp1252) */ LOCVAL(LOCALE_ILANGUAGE, "0816") diff --git a/ole/nls/rom.nls b/ole/nls/rom.nls index ddedc4d603c..10de1db5240 100644 --- a/ole/nls/rom.nls +++ b/ole/nls/rom.nls @@ -1,7 +1,7 @@ /* * OLE2NLS library * Romania - * (Romanian strings in iso-8859-2) + * (Romanian strings in cp1250) */ LOCVAL(LOCALE_ILANGUAGE,"0418") diff --git a/ole/nls/slv.nls b/ole/nls/slv.nls index af03c3a3067..127fd5b7018 100644 --- a/ole/nls/slv.nls +++ b/ole/nls/slv.nls @@ -1,7 +1,7 @@ /* * OLE2NLS library * Slovenia - * (Slovenian strings in iso-8859-2) + * (Slovenian strings in cp1250) */ LOCVAL(LOCALE_ILANGUAGE,"0424") diff --git a/ole/nls/sve.nls b/ole/nls/sve.nls index 442686f22a9..39e7db168a0 100644 --- a/ole/nls/sve.nls +++ b/ole/nls/sve.nls @@ -2,7 +2,7 @@ * OLE2NLS library * Sweden * - * (swedish strings in iso-8859-1) + * (swedish strings in cp1252) */ LOCVAL(LOCALE_ILANGUAGE,"041d") diff --git a/ole/ole2nls.c b/ole/ole2nls.c index c5ae96d3e27..9b149e4e9c4 100644 --- a/ole/ole2nls.c +++ b/ole/ole2nls.c @@ -472,9 +472,9 @@ INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len) found=0; i=0; lang=lcid; - if ((lang & 0xff) == 0x00) /*LANG_NEUTRAL ==> US English*/ + if ((lang & 0x3ff) == 0x000) /*LANG_NEUTRAL ==> US English*/ { - lang = 0x409; + lang = 0x0409; WARN(ole,"no language set, assume LANG_ENGLISH_US \n"); } @@ -483,63 +483,204 @@ INT32 WINAPI GetLocaleInfo32A(LCID lcid,LCTYPE LCType,LPSTR buf,INT32 len) { switch(lang) { -LANG_BEGIN (LANG_GERMAN, SUBLANG_GERMAN) /*0x407*/ -#include "nls/deu.nls" +/* add languages in numerical order of main language (last two digits) + * it is much easier to find the missing holes that way */ + +LANG_BEGIN (LANG_CATALAN, SUBLANG_DEFAULT) /*0x0403*/ +#include "nls/cat.nls" LANG_END -LANG_BEGIN (LANG_DANISH, SUBLANG_DEFAULT) /*0x406*/ +LANG_BEGIN (LANG_CZECH, SUBLANG_DEFAULT) /*0x0405*/ +#include "nls/cze.nls" +LANG_END + +LANG_BEGIN (LANG_DANISH, SUBLANG_DEFAULT) /*0x0406*/ #include "nls/dan.nls" LANG_END -LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_US) /*0x409*/ -#include "nls/enu.nls" +LANG_BEGIN (LANG_GERMAN, SUBLANG_GERMAN) /*0x0407*/ +#include "nls/deu.nls" +LANG_END +LANG_BEGIN (LANG_GERMAN, SUBLANG_GERMAN_SWISS) /*0x0807*/ +#include "nls/des.nls" +LANG_END +LANG_BEGIN (LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN) /*0x0C07*/ +#include "nls/dea.nls" +LANG_END +LANG_BEGIN (LANG_GERMAN, SUBLANG_GERMAN_LUXEMBOURG) /*0x1007*/ +#include "nls/del.nls" +LANG_END +LANG_BEGIN (LANG_GERMAN, SUBLANG_GERMAN_LIECHTENSTEIN) /*0x1407*/ +#include "nls/dec.nls" LANG_END -LANG_BEGIN (LANG_ESPERANTO, SUBLANG_DEFAULT) /*0x48f*/ -#include "nls/esperanto.nls" +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_US) /*0x0409*/ +#include "nls/enu.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_UK) /*0x0809*/ +#include "nls/eng.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_AUS) /*0x0C09*/ +#include "nls/ena.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_CAN) /*0x1009*/ +#include "nls/enc.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_NZ) /*0x1409*/ +#include "nls/enz.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_EIRE) /*0x1809*/ +#include "nls/irl.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_SAFRICA) /*0x1C09*/ +#include "nls/ens.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_JAMAICA) /*0x2009*/ +#include "nls/enj.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_CARRIBEAN) /*0x2409*/ +#include "nls/enb.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_BELIZE) /*0x2809*/ +#include "nls/enl.nls" +LANG_END +LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_TRINIDAD) /*0x2C09*/ +#include "nls/ent.nls" +LANG_END + +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH) /*0x040a*/ +#include "nls/esp.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_MEXICAN) /*0x080a*/ +#include "nls/esm.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_MODERN) /*0x0C0a*/ +#include "nls/esn.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_GUATEMALA) /*0x100a*/ +#include "nls/esg.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_COSTARICA) /*0x140a*/ +#include "nls/esc.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_PANAMA) /*0x180a*/ +#include "nls/esa.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_DOMINICAN) /*0x1C0A*/ +#include "nls/esd.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_VENEZUELA) /*0x200a*/ +#include "nls/esv.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_COLOMBIA) /*0x240a*/ +#include "nls/eso.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_PERU) /*0x280a*/ +#include "nls/esr.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_ARGENTINA) /*0x2c0a*/ +#include "nls/ess.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_ECUADOR) /*0x300a*/ +#include "nls/esf.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_CHILE) /*0x340a*/ +#include "nls/esl.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_URUGUAY) /*0x380a*/ +#include "nls/esy.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_PARAGUAY) /*0x3c0a*/ +#include "nls/esz.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_BOLIVIA) /*0x400a*/ +#include "nls/esb.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_EL_SALVADOR) /*0x440a*/ +#include "nls/ese.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_HONDURAS) /*0x480a*/ +#include "nls/esh.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_NICARAGUA) /*0x4c0a*/ +#include "nls/esi.nls" +LANG_END +LANG_BEGIN (LANG_SPANISH, SUBLANG_SPANISH_PUERTO_RICO) /*0x500a*/ +#include "nls/esu.nls" LANG_END LANG_BEGIN (LANG_FINNISH, SUBLANG_DEFAULT) /*0x040B*/ #include "nls/fin.nls" LANG_END -LANG_BEGIN (LANG_FRENCH, SUBLANG_DEFAULT) /*0x040C*/ +LANG_BEGIN (LANG_FRENCH, SUBLANG_FRENCH) /*0x040C*/ #include "nls/fra.nls" LANG_END - -LANG_BEGIN (LANG_ITALIAN, SUBLANG_ITALIAN) /*0x410*/ -#include "nls/ita.nls" +LANG_BEGIN (LANG_FRENCH, SUBLANG_FRENCH_BELGIAN) /*0x080C*/ +#include "nls/frb.nls" +LANG_END +LANG_BEGIN (LANG_FRENCH, SUBLANG_FRENCH_CANADIAN) /*0x0C0C*/ +#include "nls/frc.nls" +LANG_END +LANG_BEGIN (LANG_FRENCH, SUBLANG_FRENCH_SWISS) /*0x100C*/ +#include "nls/frs.nls" +LANG_END +LANG_BEGIN (LANG_FRENCH, SUBLANG_FRENCH_LUXEMBOURG) /*0x140C*/ +#include "nls/frl.nls" LANG_END -LANG_BEGIN (LANG_ENGLISH, SUBLANG_ENGLISH_UK) /*0x809*/ -#include "nls/eng.nls" -LANG_END - -LANG_BEGIN (LANG_KOREAN, SUBLANG_KOREAN) /*0x412*/ -#include "nls/kor.nls" -LANG_END - -LANG_BEGIN (LANG_HUNGARIAN, SUBLANG_DEFAULT) /*0x40e*/ +LANG_BEGIN (LANG_HUNGARIAN, SUBLANG_DEFAULT) /*0x040e*/ #include "nls/hun.nls" LANG_END -LANG_BEGIN (LANG_POLISH, SUBLANG_DEFAULT) /*0x415*/ +LANG_BEGIN (LANG_ITALIAN, SUBLANG_ITALIAN) /*0x0410*/ +#include "nls/ita.nls" +LANG_END +LANG_BEGIN (LANG_ITALIAN, SUBLANG_ITALIAN_SWISS) /*0x0810*/ +#include "nls/its.nls" +LANG_END + +LANG_BEGIN (LANG_KOREAN, SUBLANG_KOREAN) /*0x0412*/ +#include "nls/kor.nls" +LANG_END + +LANG_BEGIN (LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL) /*0x0414*/ +#include "nls/nor.nls" +LANG_END +LANG_BEGIN (LANG_NORWEGIAN, SUBLANG_NORWEGIAN_NYNORSK) /*0x0814*/ +#include "nls/non.nls" +LANG_END + +LANG_BEGIN (LANG_POLISH, SUBLANG_DEFAULT) /*0x0415*/ #include "nls/plk.nls" LANG_END -LANG_BEGIN (LANG_PORTUGUESE ,SUBLANG_PORTUGUESE_BRAZILIAN) /*0x416*/ +LANG_BEGIN (LANG_PORTUGUESE ,SUBLANG_PORTUGUESE_BRAZILIAN) /*0x0416*/ #include "nls/ptb.nls" LANG_END - -LANG_BEGIN (LANG_SWEDISH, SUBLANG_DEFAULT) /*0x41d*/ -#include "nls/sve.nls" +LANG_BEGIN (LANG_PORTUGUESE ,SUBLANG_PORTUGUESE) /*0x0816*/ +#include "nls/ptg.nls" LANG_END -LANG_BEGIN (LANG_SLOVAK, SUBLANG_DEFAULT) /*0x41b*/ +LANG_BEGIN (LANG_SLOVAK, SUBLANG_DEFAULT) /*0x041b*/ #include "nls/sky.nls" LANG_END -/*Insert other languages here*/ +LANG_BEGIN (LANG_SWEDISH, SUBLANG_SWEDISH) /*0x041d*/ +#include "nls/sve.nls" +LANG_END +LANG_BEGIN (LANG_SWEDISH, SUBLANG_SWEDISH_FINLAND) /*0x081d*/ +#include "nls/svf.nls" +LANG_END + +LANG_BEGIN (LANG_THAI, SUBLANG_DEFAULT) /*0x41e*/ +#include "nls/tha.nls" +LANG_END + +LANG_BEGIN (LANG_ESPERANTO, SUBLANG_DEFAULT) /*0x048f*/ +#include "nls/esperanto.nls" +LANG_END + default: found=0; @@ -557,7 +698,8 @@ LANG_END } while (!found && i<3); if(!found) - { ERR(ole,"'%s' not supported for your language.\n", retString); + { ERR(ole,"'%s' not supported for your language (%4X).\n", + retString,lang); SetLastError(ERROR_INVALID_PARAMETER); return 0; }