[uim-commit] r1488 - trunk/xim
ekato at freedesktop.org
ekato at freedesktop.org
Mon Sep 12 11:39:29 PDT 2005
Author: ekato
Date: 2005-09-12 11:39:27 -0700 (Mon, 12 Sep 2005)
New Revision: 1488
Modified:
trunk/xim/locale.cpp
trunk/xim/main.cpp
Log:
* xim/locale.cpp (locale_map) : Update. These locales are check
with glibc-2.3.90.
* xim/main.cpp (init_supported_locales) : Fix segv even when there
is no suitable locales in the system. See
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327711 and
thanks to Alban Crequy.
Modified: trunk/xim/locale.cpp
===================================================================
--- trunk/xim/locale.cpp 2005-09-12 15:53:49 UTC (rev 1487)
+++ trunk/xim/locale.cpp 2005-09-12 18:39:27 UTC (rev 1488)
@@ -73,89 +73,89 @@
{"am", "am_ET", "UTF-8"},
{"ar", "ar_AA:ar_BH:ar_DZ:ar_EG:ar_IQ:ar_JO:ar_KW:ar_LB:ar_LY:ar_MA:ar_OM:ar_QA:ar_SA:ar_SD:ar_SY:ar_TN:ar_YE", "ISO8859-6:UTF-8"},
// {"as", "as", NULL},
- {"az", "az_AZ", "ISO8859-9E"},
+ {"az", "az_AZ", "ISO8859-9E:UTF-8"},
{"be", "be_BY", "CP1251:UTF-8"},
{"bg", "bg_BG", "ISO8859-5:CP1251:KOI8-R:UTF-8"},
- {"bn", "bn_BD", NULL},
+ {"bn", "bn_BD:bn_IN", "UTF-8"},
// {"bo", "bo", NULL},
- {"br", "br_FR", "ISO8859-1:ISO8859-14:ISO8859-15"},
- {"ca", "ca_ES", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"br", "br_FR:br_FR at euro", "ISO8859-1:ISO8859-14:ISO8859-15:UTF-8"},
+ {"ca", "ca_ES:ca_ES at euro", "ISO8859-1:ISO8859-15:UTF-8"},
{"cs", "cs_CZ", "ISO8859-2:UTF-8"},
- {"cy", "cy_GB", "ISO8859-1:ISO8859-14:ISO8859-15"},
+ {"cy", "cy_GB", "ISO8859-1:ISO8859-14:ISO8859-15:UTF-8"},
{"cz", "cz_CZ", "ISO8859-2"},
{"da", "da_DK", "ISO8859-1:ISO8859-15:UTF-8"},
- {"de", "de_DE:de_AT:de_BE:de_CH:de_LI:de_LU", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"de", "de_DE:de_DE at euro:de_AT:de_AT at euro:de_BE:de_BE at euro:de_CH:de_LI:de_LU:de_LU at euro", "ISO8859-1:ISO8859-15:UTF-8"},
{"el", "el_GR", "ISO8859-7:ISO8859-15:UTF-8"},
- {"en", "en_US:en_AU:en_BE:en_BZ:en_BW:en_CA:en_GB:en_HK:en_IE:en_IN:en_JM:en_NZ:en_PH:en_SG:en_TT:en_UK:en_ZA", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"en", "en_US:en_AU:en_BE:en_BZ:en_BW:en_CA:en_GB:en_HK:en_IE:en_IE at euro:en_IN:en_JM:en_NZ:en_PH:en_SG:en_TT:en_UK:en_ZA", "ISO8859-1:ISO8859-15:UTF-8"},
{"eo", "eo_XX:eo_EO", "ISO8859-3"},
- {"es", "es_ES:es_AR:es_BO:es_CL:es_CO:es_CR:es_DO:es_EC:es_GT:es_HN:es_MX:es_NI:es_PA:es_PE:es_PR:es_PY:es_SV:es_US:es_UY:es_VE", "ISO8859-1:UTF-8"},
+ {"es", "es_ES:es_ES at euro:es_AR:es_BO:es_CL:es_CO:es_CR:es_DO:es_EC:es_GT:es_HN:es_MX:es_NI:es_PA:es_PE:es_PR:es_PY:es_SV:es_US:es_UY:es_VE", "ISO8859-1:ISO8859-15:UTF-8"},
{"et", "et_EE", "ISO8859-15:ISO8859-1:ISO8859-4:UTF-8"},
- {"eu", "eu_ES", "ISO8859-1:ISO8859-15"},
+ {"eu", "eu_ES:eu_ES at euro", "ISO8859-1:ISO8859-15:UTF-8"},
{"fa", "fa_IR", "UTF-8:ISIRI-3342"},
- {"fi", "fi_FI", "ISO8859-15:ISO8859-1:UTF-8"},
+ {"fi", "fi_FI:fi_FI at euro", "ISO8859-15:ISO8859-1:UTF-8"},
{"fo", "fo_FO", "ISO8859-1:ISO8859-15:UTF-8"},
- {"fr", "fr_FR:fr_BE:fr_CA:fr_CH:fr_LU", "ISO8859-1:ISO8859-15:UTF-8"},
- {"ga", "ga_IE", "ISO8859-1:ISO8859-14:ISO8859-15"},
- {"gd", "gd_GB", "ISO8859-1:ISO8859-14:ISO8859-15"},
- {"gl", "gl_ES", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"fr", "fr_FR:fr_FR at euro:fr_BE:fr_BE at euro:fr_CA:fr_CH:fr_LU:fr_LU at euro", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"ga", "ga_IE:ga_IE at euro", "ISO8859-1:ISO8859-14:ISO8859-15:UTF-8"},
+ {"gd", "gd_GB", "ISO8859-1:ISO8859-14:ISO8859-15:UTF-8"},
+ {"gl", "gl_ES:gl_ES at euro", "ISO8859-1:ISO8859-15:UTF-8"},
// {"gu", "gu", NULL},
- {"gv", "gv_GB", "ISO8859-1:ISO8859-14:ISO8859-15"},
+ {"gv", "gv_GB", "ISO8859-1:ISO8859-14:ISO8859-15:UTF-8"},
{"he", "he_IL", "ISO8859-8:CP1255:UTF-8"},
{"hi", "hi_IN", "ISCII-DEV:UTF-8"},
{"hr", "hr_HR", "ISO8859-2:UTF-8"},
{"hy", "hy_AM", NULL},
{"id", "id_ID", NULL},
{"is", "is_IS", "ISO8859-1:ISO8859-15:UTF-8"},
- {"it", "it_IT:it_CH", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"it", "it_IT:it_IT at euro:it_CH", "ISO8859-1:ISO8859-15:UTF-8"},
{"ja", "ja_JP", "eucJP:EUC:SJIS:UTF-8"},
- {"ka", "ka_GE", "GEORGIAN-ACADEMY:GEORGIAN-PS"},
+ {"ka", "ka_GE", "GEORGIAN-ACADEMY:GEORGIAN-PS:UTF-8"},
// {"kk", "kk", NULL},
{"kl", "kl_GL", "ISO8859-1:ISO8859-15:UTF-8"},
// {"kn", "kn", NULL},
{"ko", "ko_KR", "eucKR:EUC:UTF-8"},
- {"kw", "kw_GB", "ISO8859-1:ISO8859-14:ISO8859-15"},
- {"lo", "lo_LA", "MULELAO-1:IBM-CP1133"},
+ {"kw", "kw_GB", "ISO8859-1:ISO8859-14:ISO8859-15:UTF-8"},
+ {"lo", "lo_LA", "MULELAO-1:IBM-CP1133:UTF-8"},
{"lt", "lt_LT", "ISO8859-13:ISO8859-4:UTF-8"},
{"lv", "lv_LV", "ISO8859-13:UTF-8"},
- {"mi", "mi_NZ", "ISO8859-1:ISO8859-5"},
+ {"mi", "mi_NZ", "ISO8859-1:ISO8859-5:ISO8859-13:UTF-8"},
{"mk", "mk_MK", "ISO8859-5:CP1251:UTF-8"},
// {"ml", "ml", NULL},
- {"ms", "ms_MY", "ISO8859-1"},
- {"mt", "mt_MT", "ISO8859-3"},
- {"nb", "nb_NO", "ISO8859-1:ISO8859-15"},
- {"nl", "nl_NL:nl_BE", "ISO8859-1:ISO8859-15:UTF-8"},
- {"nn", "nn_NO", "ISO8859-1:ISO8859-15"},
+ {"ms", "ms_MY", "ISO8859-1:UTF-8"},
+ {"mt", "mt_MT", "ISO8859-3:UTF-8"},
+ {"nb", "nb_NO", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"nl", "nl_NL:nl_NL at euro:nl_BE:nl_BE at euro", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"nn", "nn_NO", "ISO8859-1:ISO8859-15:UTF-8"},
{"no", "no_NO", "ISO8859-1:ISO8859-15:UTF-8"},
{"ny", "ny_NO", "ISO8859-1:ISO8859-15"},
- {"oc", "oc_FR", "ISO8859-1:ISO8859-15"},
+ {"oc", "oc_FR", "ISO8859-1:ISO8859-15:UTF-8"},
// {"or", "or", NULL},
// {"pa", "pa", NULL},
{"pd", "pd_DE", "ISO8859-1:ISO8859-15"},
{"ph", "ph_PH", "ISO8859-1"},
{"pl", "pl_PL", "ISO8859-2:UTF-8"},
{"pp", "pp_AN", "ISO8859-1"},
- {"pt", "pt_PT:pt_BR", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"pt", "pt_PT:pt_PT at euro:pt_BR", "ISO8859-1:ISO8859-15:UTF-8"},
{"ro", "ro_RO", "ISO8859-2:UTF-8"},
- {"ru", "ru_RU:ru_UA", "KOI8-R:ISO8859-5:CP1251:KOI8-U"},
+ {"ru", "ru_RU:ru_UA", "KOI8-R:ISO8859-5:CP1251:KOI8-U:UTF-8"},
{"sh", "sh_YU", "ISO8859-2:UTF-8"},
{"sk", "sk_SK", "ISO8859-2:UTF-8"},
{"sl", "sl_SI", "ISO8859-2:UTF-8"},
{"sp", "sp_YU", "ISO8859-5"},
{"sq", "sq_AL", "ISO8859-2:UTF-8"},
{"sr", "sr_YU:sr_SP", "ISO8859-2:ISO8859-5:CP1251:UTF-8"},
- {"sv", "sv_SE:sv_FI", "ISO8859-1:ISO8859-15:UTF-8"},
- {"ta", "ta_IN", "TSCII-0"},
- {"te", "te_IN", NULL},
- {"tg", "tg_TJ", "KOI8-C"},
+ {"sv", "sv_SE:sv_FI:sv_FI at euro", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"ta", "ta_IN", "TSCII-0:UTF-8"},
+ {"te", "te_IN", "UTF-8"},
+ {"tg", "tg_TJ", "KOI8-C:KOI8-T:UTF-8"},
{"th", "th_TH", "ISO8859-11:TIS620:UTF-8"},
- {"tl", "tl_PH", "ISO8859-1"},
+ {"tl", "tl_PH", "ISO8859-1:UTF-8"},
{"tr", "tr_TR", "ISO8859-9:UTF-8"},
- {"tt", "tt_RU", "TATAR-CYR:KOI8-C"},
+ {"tt", "tt_RU", "TATAR-CYR:KOI8-C:UTF-8"},
{"uk", "uk_UA", "KOI8-U:ISO8859-5:CP1251:UTF-8"},
- {"ur", "ur_PK", "CP1256"},
+ {"ur", "ur_PK", "CP1256:UTF-8"},
{"vi", "vi_VN", "TCVN:VISCII:UTF-8"},
- {"wa", "wa_BE", "ISO8859-1:ISO8859-15"},
- {"yi", "yi_US", "CP1255"},
+ {"wa", "wa_BE:wa_BE at euro", "ISO8859-1:ISO8859-15:UTF-8"},
+ {"yi", "yi_US", "CP1255:UTF-8"},
{"zh_CN", "zh_CN", "gb2312:eucCN:gbk:UTF-8"}, // from uim-py and uim-pyunihan
{"zh_TW:zh_HK", "zh_TW:zh_HK", "big5:eucTW:big5hkscs:UTF-8"}, // from uim-pinyin-big5
{"zh", "zh_CN:zh_TW:zh_HK", NULL}, // this entry must be here since its encoding is assigned as NULL
Modified: trunk/xim/main.cpp
===================================================================
--- trunk/xim/main.cpp 2005-09-12 15:53:49 UTC (rev 1487)
+++ trunk/xim/main.cpp 2005-09-12 18:39:27 UTC (rev 1488)
@@ -415,13 +415,18 @@
{
std::list<char *> locale_list;
char *locales;
+ const char *s;
int len;
asprintf(&supported_locales, "@locale=");
len = strlen(supported_locales);
// get all locales
- locales = strdup(compose_localenames_from_im_lang("*"));
+ s = compose_localenames_from_im_lang("*");
+ if (s)
+ locales = strdup(s);
+ else
+ locales = strdup("");
// replace ':' with ','
char *sep;
char *tmp = locales;
More information about the uim-commit
mailing list