diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc index 6c5ffbbb..9a575bf7 100644 --- a/src/FbTk/FbString.cc +++ b/src/FbTk/FbString.cc @@ -54,6 +54,11 @@ static int iconv_convs[CONVSIZE]; /// Initialise all of the iconv conversion descriptors void init() { + static bool s_init = false; + if (s_init) + return; + s_init = true; + iconv_convs = new iconv_t[CONVSIZE]; setlocale(LC_CTYPE, ""); diff --git a/src/FbTk/I18n.cc b/src/FbTk/I18n.cc index 62fda06b..43af752b 100644 --- a/src/FbTk/I18n.cc +++ b/src/FbTk/I18n.cc @@ -66,6 +66,7 @@ using std::string; namespace FbTk { void NLSInit(const char *catalog) { + FbStringUtil::init(); I18n *i18n = I18n::instance(); i18n->openCatalog(catalog); }