diff options
Diffstat (limited to 'sql/sql_locale.cc')
-rw-r--r-- | sql/sql_locale.cc | 899 |
1 files changed, 757 insertions, 142 deletions
diff --git a/sql/sql_locale.cc b/sql/sql_locale.cc index a90a47ce0c1..13e00c99f19 100644 --- a/sql/sql_locale.cc +++ b/sql/sql_locale.cc @@ -1,6 +1,4 @@ -/* - Copyright (c) 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc. - Use is subject to license terms. +/* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,8 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* The beginnings of locale(7) support. @@ -23,7 +20,48 @@ !! This file is built from my_locale.pl !! */ -#include "mysql_priv.h" +#include "sql_priv.h" +#include "unireg.h" +#include "sql_locale.h" +#include "sql_class.h" // THD +#include "my_sys.h" // MY_*, NullS, NULL + + +enum err_msgs_index +{ + en_US= 0, cs_CZ, da_DK, nl_NL, et_EE, fr_FR, de_DE, el_GR, hu_HU, it_IT, + ja_JP, ko_KR, no_NO, nn_NO, pl_PL, pt_PT, ro_RO, ru_RU, sr_RS, sk_SK, + es_ES, sv_SE, uk_UA +} ERR_MSGS_INDEX; + + +MY_LOCALE_ERRMSGS global_errmsgs[]= +{ + {"english", NULL}, + {"czech", NULL}, + {"danish", NULL}, + {"dutch", NULL}, + {"estonian", NULL}, + {"french", NULL}, + {"german", NULL}, + {"greek", NULL}, + {"hungarian", NULL}, + {"italian", NULL}, + {"japanese", NULL}, + {"korean", NULL}, + {"norwegian", NULL}, + {"norwegian-ny", NULL}, + {"polish", NULL}, + {"portuguese", NULL}, + {"romanian", NULL}, + {"russian", NULL}, + {"serbian", NULL}, + {"slovak", NULL}, + {"spanish", NULL}, + {"swedish", NULL}, + {"ukrainian", NULL}, + {NULL, NULL} +}; /***** LOCALE BEGIN ar_AE: Arabic - United Arab Emirates *****/ @@ -54,7 +92,11 @@ MY_LOCALE my_locale_ar_AE &my_locale_typelib_day_names_ar_AE, &my_locale_typelib_ab_day_names_ar_AE, 6, - 8 + 8, + '.', /* decimal point ar_AE */ + ',', /* thousands_sep ar_AE */ + "\x03", /* grouping ar_AE */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_AE *****/ @@ -86,7 +128,11 @@ MY_LOCALE my_locale_ar_BH &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_BH */ + ',', /* thousands_sep ar_BH */ + "\x03", /* grouping ar_BH */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_BH *****/ @@ -118,7 +164,11 @@ MY_LOCALE my_locale_ar_JO &my_locale_typelib_day_names_ar_JO, &my_locale_typelib_ab_day_names_ar_JO, 12, - 8 + 8, + '.', /* decimal point ar_JO */ + ',', /* thousands_sep ar_JO */ + "\x03", /* grouping ar_JO */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_JO *****/ @@ -150,7 +200,11 @@ MY_LOCALE my_locale_ar_SA &my_locale_typelib_day_names_ar_SA, &my_locale_typelib_ab_day_names_ar_SA, 12, - 8 + 8, + '.', /* decimal point ar_SA */ + '\0', /* thousands_sep ar_SA */ + "\x80", /* grouping ar_SA */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_SA *****/ @@ -182,7 +236,11 @@ MY_LOCALE my_locale_ar_SY &my_locale_typelib_day_names_ar_SY, &my_locale_typelib_ab_day_names_ar_SY, 12, - 8 + 8, + '.', /* decimal point ar_SY */ + ',', /* thousands_sep ar_SY */ + "\x03", /* grouping ar_SY */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_SY *****/ @@ -214,7 +272,11 @@ MY_LOCALE my_locale_be_BY &my_locale_typelib_day_names_be_BY, &my_locale_typelib_ab_day_names_be_BY, 10, - 10 + 10, + ',', /* decimal point be_BY */ + '.', /* thousands_sep be_BY */ + "\x03\x03", /* grouping be_BY */ + &global_errmsgs[en_US] ); /***** LOCALE END be_BY *****/ @@ -246,7 +308,11 @@ MY_LOCALE my_locale_bg_BG &my_locale_typelib_day_names_bg_BG, &my_locale_typelib_ab_day_names_bg_BG, 9, - 10 + 10, + ',', /* decimal point bg_BG */ + '\0', /* thousands_sep bg_BG */ + "\x03\x03", /* grouping bg_BG */ + &global_errmsgs[en_US] ); /***** LOCALE END bg_BG *****/ @@ -278,7 +344,11 @@ MY_LOCALE my_locale_ca_ES &my_locale_typelib_day_names_ca_ES, &my_locale_typelib_ab_day_names_ca_ES, 8, - 9 + 9, + ',', /* decimal point ca_ES */ + '\0', /* thousands_sep ca_ES */ + "\x80\x80", /* grouping ca_ES */ + &global_errmsgs[en_US] ); /***** LOCALE END ca_ES *****/ @@ -310,7 +380,11 @@ MY_LOCALE my_locale_cs_CZ &my_locale_typelib_day_names_cs_CZ, &my_locale_typelib_ab_day_names_cs_CZ, 8, - 7 + 7, + ',', /* decimal point cs_CZ */ + ' ', /* thousands_sep cs_CZ */ + "\x03\x03", /* grouping cs_CZ */ + &global_errmsgs[cs_CZ] ); /***** LOCALE END cs_CZ *****/ @@ -342,7 +416,11 @@ MY_LOCALE my_locale_da_DK &my_locale_typelib_day_names_da_DK, &my_locale_typelib_ab_day_names_da_DK, 9, - 7 + 7, + ',', /* decimal point da_DK */ + '.', /* thousands_sep da_DK */ + "\x03\x03", /* grouping da_DK */ + &global_errmsgs[da_DK] ); /***** LOCALE END da_DK *****/ @@ -374,7 +452,11 @@ MY_LOCALE my_locale_de_AT &my_locale_typelib_day_names_de_AT, &my_locale_typelib_ab_day_names_de_AT, 9, - 10 + 10, + ',', /* decimal point de_AT */ + '\0', /* thousands_sep de_AT */ + "\x80\x80", /* grouping de_AT */ + &global_errmsgs[de_DE] ); /***** LOCALE END de_AT *****/ @@ -406,7 +488,11 @@ MY_LOCALE my_locale_de_DE &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE, 9, - 10 + 10, + ',', /* decimal point de_DE */ + '.', /* thousands_sep de_DE */ + "\x03\x03", /* grouping de_DE */ + &global_errmsgs[de_DE] ); /***** LOCALE END de_DE *****/ @@ -438,7 +524,11 @@ MY_LOCALE my_locale_en_US &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US, 9, - 9 + 9, + '.', /* decimal point en_US */ + ',', /* thousands_sep en_US */ + "\x03\x03", /* grouping en_US */ + &global_errmsgs[en_US] ); /***** LOCALE END en_US *****/ @@ -470,7 +560,11 @@ MY_LOCALE my_locale_es_ES &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + ',', /* decimal point es_ES */ + '\0', /* thousands_sep es_ES */ + "\x80\x80", /* grouping es_ES */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_ES *****/ @@ -502,7 +596,11 @@ MY_LOCALE my_locale_et_EE &my_locale_typelib_day_names_et_EE, &my_locale_typelib_ab_day_names_et_EE, 9, - 9 + 9, + ',', /* decimal point et_EE */ + ' ', /* thousands_sep et_EE */ + "\x03\x03", /* grouping et_EE */ + &global_errmsgs[et_EE] ); /***** LOCALE END et_EE *****/ @@ -534,7 +632,11 @@ MY_LOCALE my_locale_eu_ES &my_locale_typelib_day_names_eu_ES, &my_locale_typelib_ab_day_names_eu_ES, 9, - 10 + 10, + ',', /* decimal point eu_ES */ + '\0', /* thousands_sep eu_ES */ + "\x80\x80", /* grouping eu_ES */ + &global_errmsgs[en_US] ); /***** LOCALE END eu_ES *****/ @@ -566,7 +668,11 @@ MY_LOCALE my_locale_fi_FI &my_locale_typelib_day_names_fi_FI, &my_locale_typelib_ab_day_names_fi_FI, 9, - 11 + 11, + ',', /* decimal point fi_FI */ + ' ', /* thousands_sep fi_FI */ + "\x03\x03", /* grouping fi_FI */ + &global_errmsgs[en_US] ); /***** LOCALE END fi_FI *****/ @@ -598,7 +704,11 @@ MY_LOCALE my_locale_fo_FO &my_locale_typelib_day_names_fo_FO, &my_locale_typelib_ab_day_names_fo_FO, 9, - 12 + 12, + ',', /* decimal point fo_FO */ + '.', /* thousands_sep fo_FO */ + "\x03\x03", /* grouping fo_FO */ + &global_errmsgs[en_US] ); /***** LOCALE END fo_FO *****/ @@ -630,7 +740,11 @@ MY_LOCALE my_locale_fr_FR &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR, 9, - 8 + 8, + ',', /* decimal point fr_FR */ + '\0', /* thousands_sep fr_FR */ + "\x80\x80", /* grouping fr_FR */ + &global_errmsgs[fr_FR] ); /***** LOCALE END fr_FR *****/ @@ -662,7 +776,11 @@ MY_LOCALE my_locale_gl_ES &my_locale_typelib_day_names_gl_ES, &my_locale_typelib_ab_day_names_gl_ES, 8, - 8 + 8, + ',', /* decimal point gl_ES */ + '\0', /* thousands_sep gl_ES */ + "\x80\x80", /* grouping gl_ES */ + &global_errmsgs[en_US] ); /***** LOCALE END gl_ES *****/ @@ -694,7 +812,11 @@ MY_LOCALE my_locale_gu_IN &my_locale_typelib_day_names_gu_IN, &my_locale_typelib_ab_day_names_gu_IN, 10, - 8 + 8, + '.', /* decimal point gu_IN */ + ',', /* thousands_sep gu_IN */ + "\x03", /* grouping gu_IN */ + &global_errmsgs[en_US] ); /***** LOCALE END gu_IN *****/ @@ -726,7 +848,11 @@ MY_LOCALE my_locale_he_IL &my_locale_typelib_day_names_he_IL, &my_locale_typelib_ab_day_names_he_IL, 7, - 5 + 5, + '.', /* decimal point he_IL */ + ',', /* thousands_sep he_IL */ + "\x03\x03", /* grouping he_IL */ + &global_errmsgs[en_US] ); /***** LOCALE END he_IL *****/ @@ -758,7 +884,11 @@ MY_LOCALE my_locale_hi_IN &my_locale_typelib_day_names_hi_IN, &my_locale_typelib_ab_day_names_hi_IN, 7, - 9 + 9, + '.', /* decimal point hi_IN */ + ',', /* thousands_sep hi_IN */ + "\x03", /* grouping hi_IN */ + &global_errmsgs[en_US] ); /***** LOCALE END hi_IN *****/ @@ -790,7 +920,11 @@ MY_LOCALE my_locale_hr_HR &my_locale_typelib_day_names_hr_HR, &my_locale_typelib_ab_day_names_hr_HR, 8, - 11 + 11, + ',', /* decimal point hr_HR */ + '\0', /* thousands_sep hr_HR */ + "\x80\x80", /* grouping hr_HR */ + &global_errmsgs[en_US] ); /***** LOCALE END hr_HR *****/ @@ -822,7 +956,11 @@ MY_LOCALE my_locale_hu_HU &my_locale_typelib_day_names_hu_HU, &my_locale_typelib_ab_day_names_hu_HU, 10, - 9 + 9, + ',', /* decimal point hu_HU */ + '.', /* thousands_sep hu_HU */ + "\x03\x03", /* grouping hu_HU */ + &global_errmsgs[hu_HU] ); /***** LOCALE END hu_HU *****/ @@ -854,7 +992,11 @@ MY_LOCALE my_locale_id_ID &my_locale_typelib_day_names_id_ID, &my_locale_typelib_ab_day_names_id_ID, 9, - 6 + 6, + ',', /* decimal point id_ID */ + '.', /* thousands_sep id_ID */ + "\x03\x03", /* grouping id_ID */ + &global_errmsgs[en_US] ); /***** LOCALE END id_ID *****/ @@ -886,7 +1028,11 @@ MY_LOCALE my_locale_is_IS &my_locale_typelib_day_names_is_IS, &my_locale_typelib_ab_day_names_is_IS, 9, - 12 + 12, + ',', /* decimal point is_IS */ + '.', /* thousands_sep is_IS */ + "\x03\x03", /* grouping is_IS */ + &global_errmsgs[en_US] ); /***** LOCALE END is_IS *****/ @@ -918,7 +1064,11 @@ MY_LOCALE my_locale_it_CH &my_locale_typelib_day_names_it_CH, &my_locale_typelib_ab_day_names_it_CH, 9, - 9 + 9, + ',', /* decimal point it_CH */ + '\'', /* thousands_sep it_CH */ + "\x03\x03", /* grouping it_CH */ + &global_errmsgs[it_IT] ); /***** LOCALE END it_CH *****/ @@ -950,7 +1100,11 @@ MY_LOCALE my_locale_ja_JP &my_locale_typelib_day_names_ja_JP, &my_locale_typelib_ab_day_names_ja_JP, 3, - 3 + 3, + '.', /* decimal point ja_JP */ + ',', /* thousands_sep ja_JP */ + "\x03", /* grouping ja_JP */ + &global_errmsgs[ja_JP] ); /***** LOCALE END ja_JP *****/ @@ -982,7 +1136,11 @@ MY_LOCALE my_locale_ko_KR &my_locale_typelib_day_names_ko_KR, &my_locale_typelib_ab_day_names_ko_KR, 3, - 3 + 3, + '.', /* decimal point ko_KR */ + ',', /* thousands_sep ko_KR */ + "\x03\x03", /* grouping ko_KR */ + &global_errmsgs[ko_KR] ); /***** LOCALE END ko_KR *****/ @@ -1014,7 +1172,11 @@ MY_LOCALE my_locale_lt_LT &my_locale_typelib_day_names_lt_LT, &my_locale_typelib_ab_day_names_lt_LT, 9, - 14 + 14, + ',', /* decimal point lt_LT */ + '.', /* thousands_sep lt_LT */ + "\x03\x03", /* grouping lt_LT */ + &global_errmsgs[en_US] ); /***** LOCALE END lt_LT *****/ @@ -1046,7 +1208,11 @@ MY_LOCALE my_locale_lv_LV &my_locale_typelib_day_names_lv_LV, &my_locale_typelib_ab_day_names_lv_LV, 10, - 11 + 11, + ',', /* decimal point lv_LV */ + ' ', /* thousands_sep lv_LV */ + "\x03\x03", /* grouping lv_LV */ + &global_errmsgs[en_US] ); /***** LOCALE END lv_LV *****/ @@ -1078,7 +1244,11 @@ MY_LOCALE my_locale_mk_MK &my_locale_typelib_day_names_mk_MK, &my_locale_typelib_ab_day_names_mk_MK, 9, - 10 + 10, + ',', /* decimal point mk_MK */ + ' ', /* thousands_sep mk_MK */ + "\x03\x03", /* grouping mk_MK */ + &global_errmsgs[en_US] ); /***** LOCALE END mk_MK *****/ @@ -1110,7 +1280,11 @@ MY_LOCALE my_locale_mn_MN &my_locale_typelib_day_names_mn_MN, &my_locale_typelib_ab_day_names_mn_MN, 18, - 6 + 6, + ',', /* decimal point mn_MN */ + '.', /* thousands_sep mn_MN */ + "\x03\x03", /* grouping mn_MN */ + &global_errmsgs[en_US] ); /***** LOCALE END mn_MN *****/ @@ -1142,7 +1316,11 @@ MY_LOCALE my_locale_ms_MY &my_locale_typelib_day_names_ms_MY, &my_locale_typelib_ab_day_names_ms_MY, 9, - 6 + 6, + '.', /* decimal point ms_MY */ + ',', /* thousands_sep ms_MY */ + "\x03", /* grouping ms_MY */ + &global_errmsgs[en_US] ); /***** LOCALE END ms_MY *****/ @@ -1174,7 +1352,11 @@ MY_LOCALE my_locale_nb_NO &my_locale_typelib_day_names_nb_NO, &my_locale_typelib_ab_day_names_nb_NO, 9, - 7 + 7, + ',', /* decimal point nb_NO */ + '.', /* thousands_sep nb_NO */ + "\x03\x03", /* grouping nb_NO */ + &global_errmsgs[no_NO] ); /***** LOCALE END nb_NO *****/ @@ -1206,7 +1388,11 @@ MY_LOCALE my_locale_nl_NL &my_locale_typelib_day_names_nl_NL, &my_locale_typelib_ab_day_names_nl_NL, 9, - 9 + 9, + ',', /* decimal point nl_NL */ + '\0', /* thousands_sep nl_NL */ + "\x80\x80", /* grouping nl_NL */ + &global_errmsgs[nl_NL] ); /***** LOCALE END nl_NL *****/ @@ -1238,7 +1424,11 @@ MY_LOCALE my_locale_pl_PL &my_locale_typelib_day_names_pl_PL, &my_locale_typelib_ab_day_names_pl_PL, 11, - 12 + 12, + ',', /* decimal point pl_PL */ + '\0', /* thousands_sep pl_PL */ + "\x80\x80", /* grouping pl_PL */ + &global_errmsgs[pl_PL] ); /***** LOCALE END pl_PL *****/ @@ -1270,7 +1460,11 @@ MY_LOCALE my_locale_pt_BR &my_locale_typelib_day_names_pt_BR, &my_locale_typelib_ab_day_names_pt_BR, 9, - 7 + 7, + ',', /* decimal point pt_BR */ + '\0', /* thousands_sep pt_BR */ + "\x80\x80", /* grouping pt_BR */ + &global_errmsgs[pt_PT] ); /***** LOCALE END pt_BR *****/ @@ -1302,7 +1496,11 @@ MY_LOCALE my_locale_pt_PT &my_locale_typelib_day_names_pt_PT, &my_locale_typelib_ab_day_names_pt_PT, 9, - 7 + 7, + ',', /* decimal point pt_PT */ + '\0', /* thousands_sep pt_PT */ + "\x80\x80", /* grouping pt_PT */ + &global_errmsgs[pt_PT] ); /***** LOCALE END pt_PT *****/ @@ -1334,7 +1532,11 @@ MY_LOCALE my_locale_ro_RO &my_locale_typelib_day_names_ro_RO, &my_locale_typelib_ab_day_names_ro_RO, 10, - 8 + 8, + ',', /* decimal point ro_RO */ + '.', /* thousands_sep ro_RO */ + "\x03\x03", /* grouping ro_RO */ + &global_errmsgs[ro_RO] ); /***** LOCALE END ro_RO *****/ @@ -1366,7 +1568,11 @@ MY_LOCALE my_locale_ru_RU &my_locale_typelib_day_names_ru_RU, &my_locale_typelib_ab_day_names_ru_RU, 8, - 11 + 11, + ',', /* decimal point ru_RU */ + ' ', /* thousands_sep ru_RU */ + "\x03\x03", /* grouping ru_RU */ + &global_errmsgs[ru_RU] ); /***** LOCALE END ru_RU *****/ @@ -1398,7 +1604,11 @@ MY_LOCALE my_locale_ru_UA &my_locale_typelib_day_names_ru_UA, &my_locale_typelib_ab_day_names_ru_UA, 8, - 11 + 11, + ',', /* decimal point ru_UA */ + '.', /* thousands_sep ru_UA */ + "\x03\x03", /* grouping ru_UA */ + &global_errmsgs[ru_RU] ); /***** LOCALE END ru_UA *****/ @@ -1430,7 +1640,11 @@ MY_LOCALE my_locale_sk_SK &my_locale_typelib_day_names_sk_SK, &my_locale_typelib_ab_day_names_sk_SK, 9, - 8 + 8, + ',', /* decimal point sk_SK */ + ' ', /* thousands_sep sk_SK */ + "\x03\x03", /* grouping sk_SK */ + &global_errmsgs[sk_SK] ); /***** LOCALE END sk_SK *****/ @@ -1462,7 +1676,11 @@ MY_LOCALE my_locale_sl_SI &my_locale_typelib_day_names_sl_SI, &my_locale_typelib_ab_day_names_sl_SI, 9, - 10 + 10, + ',', /* decimal point sl_SI */ + ' ', /* thousands_sep sl_SI */ + "\x80\x80", /* grouping sl_SI */ + &global_errmsgs[en_US] ); /***** LOCALE END sl_SI *****/ @@ -1494,41 +1712,67 @@ MY_LOCALE my_locale_sq_AL &my_locale_typelib_day_names_sq_AL, &my_locale_typelib_ab_day_names_sq_AL, 7, - 10 + 10, + ',', /* decimal point sq_AL */ + '.', /* thousands_sep sq_AL */ + "\x03", /* grouping sq_AL */ + &global_errmsgs[en_US] ); /***** LOCALE END sq_AL *****/ -/***** LOCALE BEGIN sr_YU: Servian - Yugoslavia *****/ -static const char *my_locale_month_names_sr_YU[13] = +/***** LOCALE BEGIN sr_RS: Serbian - Serbia *****/ +static const char *my_locale_month_names_sr_RS[13] = {"januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar", NullS }; -static const char *my_locale_ab_month_names_sr_YU[13] = +static const char *my_locale_ab_month_names_sr_RS[13] = {"jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec", NullS }; -static const char *my_locale_day_names_sr_YU[8] = +static const char *my_locale_day_names_sr_RS[8] = {"ponedeljak","utorak","sreda","četvrtak","petak","subota","nedelja", NullS }; -static const char *my_locale_ab_day_names_sr_YU[8] = +static const char *my_locale_ab_day_names_sr_RS[8] = {"pon","uto","sre","čet","pet","sub","ned", NullS }; -static TYPELIB my_locale_typelib_month_names_sr_YU = - { array_elements(my_locale_month_names_sr_YU)-1, "", my_locale_month_names_sr_YU, NULL }; -static TYPELIB my_locale_typelib_ab_month_names_sr_YU = - { array_elements(my_locale_ab_month_names_sr_YU)-1, "", my_locale_ab_month_names_sr_YU, NULL }; -static TYPELIB my_locale_typelib_day_names_sr_YU = - { array_elements(my_locale_day_names_sr_YU)-1, "", my_locale_day_names_sr_YU, NULL }; -static TYPELIB my_locale_typelib_ab_day_names_sr_YU = - { array_elements(my_locale_ab_day_names_sr_YU)-1, "", my_locale_ab_day_names_sr_YU, NULL }; -MY_LOCALE my_locale_sr_YU +static TYPELIB my_locale_typelib_month_names_sr_RS = + { array_elements(my_locale_month_names_sr_RS)-1, "", my_locale_month_names_sr_RS, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_sr_RS = + { array_elements(my_locale_ab_month_names_sr_RS)-1, "", my_locale_ab_month_names_sr_RS, NULL }; +static TYPELIB my_locale_typelib_day_names_sr_RS = + { array_elements(my_locale_day_names_sr_RS)-1, "", my_locale_day_names_sr_RS, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_sr_RS = + { array_elements(my_locale_ab_day_names_sr_RS)-1, "", my_locale_ab_day_names_sr_RS, NULL }; +MY_LOCALE my_locale_sr_YU /* Deprecated, use sr_RS instead */ ( 48, "sr_YU", - "Servian - Yugoslavia", + "Serbian - Yugoslavia", FALSE, - &my_locale_typelib_month_names_sr_YU, - &my_locale_typelib_ab_month_names_sr_YU, - &my_locale_typelib_day_names_sr_YU, - &my_locale_typelib_ab_day_names_sr_YU, + &my_locale_typelib_month_names_sr_RS, + &my_locale_typelib_ab_month_names_sr_RS, + &my_locale_typelib_day_names_sr_RS, + &my_locale_typelib_ab_day_names_sr_RS, 9, - 10 + 10, + '.', /* decimal point sr_RS */ + '\0', /* thousands_sep sr_RS */ + "\x80", /* grouping sr_RS */ + &global_errmsgs[sr_RS] ); -/***** LOCALE END sr_YU *****/ + +MY_LOCALE my_locale_sr_RS +( + 48, + "sr_RS", + "Serbian - Serbia", + FALSE, + &my_locale_typelib_month_names_sr_RS, + &my_locale_typelib_ab_month_names_sr_RS, + &my_locale_typelib_day_names_sr_RS, + &my_locale_typelib_ab_day_names_sr_RS, + 9, + 10, + '.', /* decimal point sr_RS */ + '\0', /* thousands_sep sr_RS */ + "\x80", /* grouping sr_RS */ + &global_errmsgs[sr_RS] +); +/***** LOCALE END sr_RS *****/ /***** LOCALE BEGIN sv_SE: Swedish - Sweden *****/ static const char *my_locale_month_names_sv_SE[13] = @@ -1558,7 +1802,11 @@ MY_LOCALE my_locale_sv_SE &my_locale_typelib_day_names_sv_SE, &my_locale_typelib_ab_day_names_sv_SE, 9, - 7 + 7, + ',', /* decimal point sv_SE */ + ' ', /* thousands_sep sv_SE */ + "\x03\x03", /* grouping sv_SE */ + &global_errmsgs[sv_SE] ); /***** LOCALE END sv_SE *****/ @@ -1590,7 +1838,11 @@ MY_LOCALE my_locale_ta_IN &my_locale_typelib_day_names_ta_IN, &my_locale_typelib_ab_day_names_ta_IN, 10, - 8 + 8, + '.', /* decimal point ta_IN */ + ',', /* thousands_sep ta_IN */ + "\x03\x02", /* grouping ta_IN */ + &global_errmsgs[en_US] ); /***** LOCALE END ta_IN *****/ @@ -1622,7 +1874,11 @@ MY_LOCALE my_locale_te_IN &my_locale_typelib_day_names_te_IN, &my_locale_typelib_ab_day_names_te_IN, 10, - 9 + 9, + '.', /* decimal point te_IN */ + ',', /* thousands_sep te_IN */ + "\x03\x02", /* grouping te_IN */ + &global_errmsgs[en_US] ); /***** LOCALE END te_IN *****/ @@ -1654,7 +1910,11 @@ MY_LOCALE my_locale_th_TH &my_locale_typelib_day_names_th_TH, &my_locale_typelib_ab_day_names_th_TH, 10, - 8 + 8, + '.', /* decimal point th_TH */ + ',', /* thousands_sep th_TH */ + "\x03", /* grouping th_TH */ + &global_errmsgs[en_US] ); /***** LOCALE END th_TH *****/ @@ -1686,7 +1946,11 @@ MY_LOCALE my_locale_tr_TR &my_locale_typelib_day_names_tr_TR, &my_locale_typelib_ab_day_names_tr_TR, 7, - 9 + 9, + ',', /* decimal point tr_TR */ + '.', /* thousands_sep tr_TR */ + "\x03\x03", /* grouping tr_TR */ + &global_errmsgs[en_US] ); /***** LOCALE END tr_TR *****/ @@ -1718,7 +1982,11 @@ MY_LOCALE my_locale_uk_UA &my_locale_typelib_day_names_uk_UA, &my_locale_typelib_ab_day_names_uk_UA, 8, - 9 + 9, + ',', /* decimal point uk_UA */ + '.', /* thousands_sep uk_UA */ + "\x03\x03", /* grouping uk_UA */ + &global_errmsgs[uk_UA] ); /***** LOCALE END uk_UA *****/ @@ -1750,7 +2018,11 @@ MY_LOCALE my_locale_ur_PK &my_locale_typelib_day_names_ur_PK, &my_locale_typelib_ab_day_names_ur_PK, 6, - 6 + 6, + '.', /* decimal point ur_PK */ + ',', /* thousands_sep ur_PK */ + "\x03\x03", /* grouping ur_PK */ + &global_errmsgs[en_US] ); /***** LOCALE END ur_PK *****/ @@ -1782,7 +2054,11 @@ MY_LOCALE my_locale_vi_VN &my_locale_typelib_day_names_vi_VN, &my_locale_typelib_ab_day_names_vi_VN, 16, - 11 + 11, + ',', /* decimal point vi_VN */ + '.', /* thousands_sep vi_VN */ + "\x03\x03", /* grouping vi_VN */ + &global_errmsgs[en_US] ); /***** LOCALE END vi_VN *****/ @@ -1814,7 +2090,11 @@ MY_LOCALE my_locale_zh_CN &my_locale_typelib_day_names_zh_CN, &my_locale_typelib_ab_day_names_zh_CN, 3, - 3 + 3, + '.', /* decimal point zh_CN */ + ',', /* thousands_sep zh_CN */ + "\x03", /* grouping zh_CN */ + &global_errmsgs[en_US] ); /***** LOCALE END zh_CN *****/ @@ -1846,7 +2126,11 @@ MY_LOCALE my_locale_zh_TW &my_locale_typelib_day_names_zh_TW, &my_locale_typelib_ab_day_names_zh_TW, 3, - 2 + 2, + '.', /* decimal point zh_TW */ + ',', /* thousands_sep zh_TW */ + "\x03", /* grouping zh_TW */ + &global_errmsgs[en_US] ); /***** LOCALE END zh_TW *****/ @@ -1862,7 +2146,11 @@ MY_LOCALE my_locale_ar_DZ &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_DZ */ + ',', /* thousands_sep ar_DZ */ + "\x03", /* grouping ar_DZ */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_DZ *****/ @@ -1878,7 +2166,11 @@ MY_LOCALE my_locale_ar_EG &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_EG */ + ',', /* thousands_sep ar_EG */ + "\x03", /* grouping ar_EG */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_EG *****/ @@ -1894,7 +2186,11 @@ MY_LOCALE my_locale_ar_IN &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_IN */ + ',', /* thousands_sep ar_IN */ + "\x03", /* grouping ar_IN */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_IN *****/ @@ -1910,7 +2206,11 @@ MY_LOCALE my_locale_ar_IQ &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_IQ */ + ',', /* thousands_sep ar_IQ */ + "\x03", /* grouping ar_IQ */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_IQ *****/ @@ -1926,7 +2226,11 @@ MY_LOCALE my_locale_ar_KW &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_KW */ + ',', /* thousands_sep ar_KW */ + "\x03", /* grouping ar_KW */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_KW *****/ @@ -1942,7 +2246,11 @@ MY_LOCALE my_locale_ar_LB &my_locale_typelib_day_names_ar_JO, &my_locale_typelib_ab_day_names_ar_JO, 12, - 8 + 8, + '.', /* decimal point ar_LB */ + ',', /* thousands_sep ar_LB */ + "\x03", /* grouping ar_LB */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_LB *****/ @@ -1958,7 +2266,11 @@ MY_LOCALE my_locale_ar_LY &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_LY */ + ',', /* thousands_sep ar_LY */ + "\x03", /* grouping ar_LY */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_LY *****/ @@ -1974,7 +2286,11 @@ MY_LOCALE my_locale_ar_MA &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_MA */ + ',', /* thousands_sep ar_MA */ + "\x03", /* grouping ar_MA */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_MA *****/ @@ -1990,7 +2306,11 @@ MY_LOCALE my_locale_ar_OM &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_OM */ + ',', /* thousands_sep ar_OM */ + "\x03", /* grouping ar_OM */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_OM *****/ @@ -2006,7 +2326,11 @@ MY_LOCALE my_locale_ar_QA &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_QA */ + ',', /* thousands_sep ar_QA */ + "\x03", /* grouping ar_QA */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_QA *****/ @@ -2022,7 +2346,11 @@ MY_LOCALE my_locale_ar_SD &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_SD */ + ',', /* thousands_sep ar_SD */ + "\x03", /* grouping ar_SD */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_SD *****/ @@ -2038,7 +2366,11 @@ MY_LOCALE my_locale_ar_TN &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_TN */ + ',', /* thousands_sep ar_TN */ + "\x03", /* grouping ar_TN */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_TN *****/ @@ -2054,7 +2386,11 @@ MY_LOCALE my_locale_ar_YE &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH, 6, - 8 + 8, + '.', /* decimal point ar_YE */ + ',', /* thousands_sep ar_YE */ + "\x03", /* grouping ar_YE */ + &global_errmsgs[en_US] ); /***** LOCALE END ar_YE *****/ @@ -2070,7 +2406,11 @@ MY_LOCALE my_locale_de_BE &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE, 9, - 10 + 10, + ',', /* decimal point de_BE */ + '.', /* thousands_sep de_BE */ + "\x03\x03", /* grouping de_BE */ + &global_errmsgs[de_DE] ); /***** LOCALE END de_BE *****/ @@ -2086,7 +2426,11 @@ MY_LOCALE my_locale_de_CH &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE, 9, - 10 + 10, + '.', /* decimal point de_CH */ + '\'', /* thousands_sep de_CH */ + "\x03\x03", /* grouping de_CH */ + &global_errmsgs[de_DE] ); /***** LOCALE END de_CH *****/ @@ -2102,7 +2446,11 @@ MY_LOCALE my_locale_de_LU &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE, 9, - 10 + 10, + ',', /* decimal point de_LU */ + '.', /* thousands_sep de_LU */ + "\x03\x03", /* grouping de_LU */ + &global_errmsgs[de_DE] ); /***** LOCALE END de_LU *****/ @@ -2118,7 +2466,11 @@ MY_LOCALE my_locale_en_AU &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US, 9, - 9 + 9, + '.', /* decimal point en_AU */ + ',', /* thousands_sep en_AU */ + "\x03\x03", /* grouping en_AU */ + &global_errmsgs[en_US] ); /***** LOCALE END en_AU *****/ @@ -2134,7 +2486,11 @@ MY_LOCALE my_locale_en_CA &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US, 9, - 9 + 9, + '.', /* decimal point en_CA */ + ',', /* thousands_sep en_CA */ + "\x03\x03", /* grouping en_CA */ + &global_errmsgs[en_US] ); /***** LOCALE END en_CA *****/ @@ -2150,7 +2506,11 @@ MY_LOCALE my_locale_en_GB &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US, 9, - 9 + 9, + '.', /* decimal point en_GB */ + ',', /* thousands_sep en_GB */ + "\x03\x03", /* grouping en_GB */ + &global_errmsgs[en_US] ); /***** LOCALE END en_GB *****/ @@ -2166,7 +2526,11 @@ MY_LOCALE my_locale_en_IN &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US, 9, - 9 + 9, + '.', /* decimal point en_IN */ + ',', /* thousands_sep en_IN */ + "\x03\x02", /* grouping en_IN */ + &global_errmsgs[en_US] ); /***** LOCALE END en_IN *****/ @@ -2182,7 +2546,11 @@ MY_LOCALE my_locale_en_NZ &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US, 9, - 9 + 9, + '.', /* decimal point en_NZ */ + ',', /* thousands_sep en_NZ */ + "\x03\x03", /* grouping en_NZ */ + &global_errmsgs[en_US] ); /***** LOCALE END en_NZ *****/ @@ -2198,7 +2566,11 @@ MY_LOCALE my_locale_en_PH &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US, 9, - 9 + 9, + '.', /* decimal point en_PH */ + ',', /* thousands_sep en_PH */ + "\x03", /* grouping en_PH */ + &global_errmsgs[en_US] ); /***** LOCALE END en_PH *****/ @@ -2214,7 +2586,11 @@ MY_LOCALE my_locale_en_ZA &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US, 9, - 9 + 9, + '.', /* decimal point en_ZA */ + ',', /* thousands_sep en_ZA */ + "\x03\x03", /* grouping en_ZA */ + &global_errmsgs[en_US] ); /***** LOCALE END en_ZA *****/ @@ -2230,7 +2606,11 @@ MY_LOCALE my_locale_en_ZW &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US, 9, - 9 + 9, + '.', /* decimal point en_ZW */ + ',', /* thousands_sep en_ZW */ + "\x03\x03", /* grouping en_ZW */ + &global_errmsgs[en_US] ); /***** LOCALE END en_ZW *****/ @@ -2246,7 +2626,11 @@ MY_LOCALE my_locale_es_AR &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + ',', /* decimal point es_AR */ + '.', /* thousands_sep es_AR */ + "\x03\x03", /* grouping es_AR */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_AR *****/ @@ -2262,7 +2646,11 @@ MY_LOCALE my_locale_es_BO &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + ',', /* decimal point es_BO */ + '\0', /* thousands_sep es_BO */ + "\x80\x80", /* grouping es_BO */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_BO *****/ @@ -2278,7 +2666,11 @@ MY_LOCALE my_locale_es_CL &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + ',', /* decimal point es_CL */ + '\0', /* thousands_sep es_CL */ + "\x80\x80", /* grouping es_CL */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_CL *****/ @@ -2294,7 +2686,11 @@ MY_LOCALE my_locale_es_CO &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + ',', /* decimal point es_CO */ + '\0', /* thousands_sep es_CO */ + "\x80\x80", /* grouping es_CO */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_CO *****/ @@ -2310,7 +2706,11 @@ MY_LOCALE my_locale_es_CR &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_CR */ + '\0', /* thousands_sep es_CR */ + "\x80\x80", /* grouping es_CR */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_CR *****/ @@ -2326,7 +2726,11 @@ MY_LOCALE my_locale_es_DO &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_DO */ + '\0', /* thousands_sep es_DO */ + "\x80\x80", /* grouping es_DO */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_DO *****/ @@ -2342,7 +2746,11 @@ MY_LOCALE my_locale_es_EC &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + ',', /* decimal point es_EC */ + '\0', /* thousands_sep es_EC */ + "\x80\x80", /* grouping es_EC */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_EC *****/ @@ -2358,7 +2766,11 @@ MY_LOCALE my_locale_es_GT &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_GT */ + '\0', /* thousands_sep es_GT */ + "\x80\x80", /* grouping es_GT */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_GT *****/ @@ -2374,7 +2786,11 @@ MY_LOCALE my_locale_es_HN &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_HN */ + '\0', /* thousands_sep es_HN */ + "\x80\x80", /* grouping es_HN */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_HN *****/ @@ -2390,7 +2806,11 @@ MY_LOCALE my_locale_es_MX &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_MX */ + '\0', /* thousands_sep es_MX */ + "\x80\x80", /* grouping es_MX */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_MX *****/ @@ -2406,7 +2826,11 @@ MY_LOCALE my_locale_es_NI &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_NI */ + '\0', /* thousands_sep es_NI */ + "\x80\x80", /* grouping es_NI */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_NI *****/ @@ -2422,7 +2846,11 @@ MY_LOCALE my_locale_es_PA &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_PA */ + '\0', /* thousands_sep es_PA */ + "\x80\x80", /* grouping es_PA */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_PA *****/ @@ -2438,7 +2866,11 @@ MY_LOCALE my_locale_es_PE &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_PE */ + '\0', /* thousands_sep es_PE */ + "\x80\x80", /* grouping es_PE */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_PE *****/ @@ -2454,7 +2886,11 @@ MY_LOCALE my_locale_es_PR &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_PR */ + '\0', /* thousands_sep es_PR */ + "\x80\x80", /* grouping es_PR */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_PR *****/ @@ -2470,7 +2906,11 @@ MY_LOCALE my_locale_es_PY &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + ',', /* decimal point es_PY */ + '\0', /* thousands_sep es_PY */ + "\x80\x80", /* grouping es_PY */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_PY *****/ @@ -2486,7 +2926,11 @@ MY_LOCALE my_locale_es_SV &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_SV */ + '\0', /* thousands_sep es_SV */ + "\x80\x80", /* grouping es_SV */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_SV *****/ @@ -2502,7 +2946,11 @@ MY_LOCALE my_locale_es_US &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + '.', /* decimal point es_US */ + ',', /* thousands_sep es_US */ + "\x03\x03", /* grouping es_US */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_US *****/ @@ -2518,7 +2966,11 @@ MY_LOCALE my_locale_es_UY &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + ',', /* decimal point es_UY */ + '\0', /* thousands_sep es_UY */ + "\x80\x80", /* grouping es_UY */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_UY *****/ @@ -2534,7 +2986,11 @@ MY_LOCALE my_locale_es_VE &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES, 10, - 9 + 9, + ',', /* decimal point es_VE */ + '\0', /* thousands_sep es_VE */ + "\x80\x80", /* grouping es_VE */ + &global_errmsgs[es_ES] ); /***** LOCALE END es_VE *****/ @@ -2550,7 +3006,11 @@ MY_LOCALE my_locale_fr_BE &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR, 9, - 8 + 8, + ',', /* decimal point fr_BE */ + '.', /* thousands_sep fr_BE */ + "\x80\x80", /* grouping fr_BE */ + &global_errmsgs[fr_FR] ); /***** LOCALE END fr_BE *****/ @@ -2566,7 +3026,11 @@ MY_LOCALE my_locale_fr_CA &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR, 9, - 8 + 8, + ',', /* decimal point fr_CA */ + ' ', /* thousands_sep fr_CA */ + "\x80\x80", /* grouping fr_CA */ + &global_errmsgs[fr_FR] ); /***** LOCALE END fr_CA *****/ @@ -2582,7 +3046,11 @@ MY_LOCALE my_locale_fr_CH &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR, 9, - 8 + 8, + ',', /* decimal point fr_CH */ + '\0', /* thousands_sep fr_CH */ + "\x80\x80", /* grouping fr_CH */ + &global_errmsgs[fr_FR] ); /***** LOCALE END fr_CH *****/ @@ -2598,7 +3066,11 @@ MY_LOCALE my_locale_fr_LU &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR, 9, - 8 + 8, + ',', /* decimal point fr_LU */ + '\0', /* thousands_sep fr_LU */ + "\x80\x80", /* grouping fr_LU */ + &global_errmsgs[fr_FR] ); /***** LOCALE END fr_LU *****/ @@ -2614,7 +3086,11 @@ MY_LOCALE my_locale_it_IT &my_locale_typelib_day_names_it_CH, &my_locale_typelib_ab_day_names_it_CH, 9, - 9 + 9, + ',', /* decimal point it_IT */ + '\0', /* thousands_sep it_IT */ + "\x80\x80", /* grouping it_IT */ + &global_errmsgs[it_IT] ); /***** LOCALE END it_IT *****/ @@ -2630,7 +3106,11 @@ MY_LOCALE my_locale_nl_BE &my_locale_typelib_day_names_nl_NL, &my_locale_typelib_ab_day_names_nl_NL, 9, - 9 + 9, + ',', /* decimal point nl_BE */ + '.', /* thousands_sep nl_BE */ + "\x80\x80", /* grouping nl_BE */ + &global_errmsgs[nl_NL] ); /***** LOCALE END nl_BE *****/ @@ -2646,7 +3126,11 @@ MY_LOCALE my_locale_no_NO &my_locale_typelib_day_names_nb_NO, &my_locale_typelib_ab_day_names_nb_NO, 9, - 7 + 7, + ',', /* decimal point no_NO */ + '.', /* thousands_sep no_NO */ + "\x03\x03", /* grouping no_NO */ + &global_errmsgs[no_NO] ); /***** LOCALE END no_NO *****/ @@ -2662,7 +3146,11 @@ MY_LOCALE my_locale_sv_FI &my_locale_typelib_day_names_sv_SE, &my_locale_typelib_ab_day_names_sv_SE, 9, - 7 + 7, + ',', /* decimal point sv_FI */ + ' ', /* thousands_sep sv_FI */ + "\x03\x03", /* grouping sv_FI */ + &global_errmsgs[sv_SE] ); /***** LOCALE END sv_FI *****/ @@ -2678,11 +3166,87 @@ MY_LOCALE my_locale_zh_HK &my_locale_typelib_day_names_zh_CN, &my_locale_typelib_ab_day_names_zh_CN, 3, - 3 + 3, + '.', /* decimal point zh_HK */ + ',', /* thousands_sep zh_HK */ + "\x03", /* grouping zh_HK */ + &global_errmsgs[en_US] ); /***** LOCALE END zh_HK *****/ +/***** LOCALE BEGIN el_GR: Greek - Greece *****/ +static const char *my_locale_month_names_el_GR[13]= +{ + "Ιανουάριος", "Φεβρουάριος", "Μάρτιος", + "Απρίλιος", "Μάιος", "Ιούνιος", + "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", + "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος", NullS +}; + +static const char *my_locale_ab_month_names_el_GR[13]= +{ + "Ιαν", "Φεβ", "Μάρ", + "Απρ", "Μάι", "Ιούν", + "Ιούλ","Αύγ", "Σεπ", + "Οκτ", "Νοέ", "Δεκ", NullS +}; + +static const char *my_locale_day_names_el_GR[8] = +{ + "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", + "Παρασκευή", "Σάββατο", "Κυριακή", NullS +}; + +static const char *my_locale_ab_day_names_el_GR[8]= +{ + "Δευ", "Τρί", "Τετ", "Πέμ", + "Παρ", "Σάβ", "Κυρ", NullS +}; + +static TYPELIB my_locale_typelib_month_names_el_GR= +{ + array_elements(my_locale_month_names_el_GR) - 1, + "", my_locale_month_names_el_GR, NULL +}; + +static TYPELIB my_locale_typelib_ab_month_names_el_GR= +{ + array_elements(my_locale_ab_month_names_el_GR)-1, + "", my_locale_ab_month_names_el_GR, NULL +}; + +static TYPELIB my_locale_typelib_day_names_el_GR= +{ + array_elements(my_locale_day_names_el_GR)-1, + "", my_locale_day_names_el_GR, NULL +}; + +static TYPELIB my_locale_typelib_ab_day_names_el_GR= +{ + array_elements(my_locale_ab_day_names_el_GR) - 1, + "", my_locale_ab_day_names_el_GR, NULL +}; + +MY_LOCALE my_locale_el_GR +( + 109, + "el_GR", + "Greek - Greece", + FALSE, + &my_locale_typelib_month_names_el_GR, + &my_locale_typelib_ab_month_names_el_GR, + &my_locale_typelib_day_names_el_GR, + &my_locale_typelib_ab_day_names_el_GR, + 11, /* max mon name length */ + 9, /* max day name length */ + ',', /* decimal point el_GR */ + '.', /* thousands_sep el_GR */ + "\x80", /* grouping el_GR */ + &global_errmsgs[el_GR] +); +/***** LOCALE END el_GR *****/ + /* The list of all locales. Note, locales must be ordered according to their @@ -2739,7 +3303,7 @@ MY_LOCALE *my_locales[]= &my_locale_sk_SK, &my_locale_sl_SI, &my_locale_sq_AL, - &my_locale_sr_YU, + &my_locale_sr_RS, &my_locale_ta_IN, &my_locale_te_IN, &my_locale_th_TH, @@ -2800,10 +3364,18 @@ MY_LOCALE *my_locales[]= &my_locale_no_NO, &my_locale_sv_FI, &my_locale_zh_HK, + &my_locale_el_GR, NULL }; +MY_LOCALE *my_locales_deprecated[]= +{ + &my_locale_sr_YU, + NULL +}; + + MY_LOCALE *my_locale_by_number(uint number) { MY_LOCALE *locale; @@ -2816,17 +3388,60 @@ MY_LOCALE *my_locale_by_number(uint number) } -MY_LOCALE *my_locale_by_name(const char *name) +static MY_LOCALE* +my_locale_by_name(MY_LOCALE** locales, const char *name) { MY_LOCALE **locale; - for (locale= my_locales; *locale != NULL; locale++) + for (locale= locales; *locale != NULL; locale++) { if (!my_strcasecmp(&my_charset_latin1, (*locale)->name, name)) - { - // Check that locale is on its correct position in the array - DBUG_ASSERT((*locale) == my_locales[(*locale)->number]); return *locale; - } } return NULL; } + + +MY_LOCALE *my_locale_by_name(const char *name) +{ + MY_LOCALE *locale; + + if ((locale= my_locale_by_name(my_locales, name))) + { + // Check that locale is on its correct position in the array + DBUG_ASSERT(locale == my_locales[locale->number]); + return locale; + } + else if ((locale= my_locale_by_name(my_locales_deprecated, name))) + { + THD *thd= current_thd; + /* + Replace the deprecated locale to the corresponding + 'fresh' locale with the same ID. + */ + locale= my_locales[locale->number]; + if (thd) + { + // Send a warning to the client + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX), + name, locale->name); + } + else + { + // Send a warning to mysqld error log + sql_print_warning("The syntax '%s' is deprecated and will be removed. " + "Please use %s instead.", + name, locale->name); + } + } + return locale; +} + + +void cleanup_errmsgs() +{ + for (MY_LOCALE_ERRMSGS *msgs= global_errmsgs; msgs->language; msgs++) + { + my_free(msgs->errmsgs); + } +} |