diff --git a/src/utilities/ntrace/TraceConfiguration.cpp b/src/utilities/ntrace/TraceConfiguration.cpp index 6f5e66190f..542358931f 100644 --- a/src/utilities/ntrace/TraceConfiguration.cpp +++ b/src/utilities/ntrace/TraceConfiguration.cpp @@ -106,7 +106,6 @@ void TraceCfgReader::readConfig() charset cs; IntlUtil::initUtf8Charset(&cs); - texttype tt; string collAttributes("ICU-VERSION="); collAttributes += Jrd::UnicodeUtil::DEFAULT_ICU_VERSION; @@ -116,7 +115,10 @@ void TraceCfgReader::readConfig() collAttributesBuffer.push(reinterpret_cast(collAttributes.c_str()), collAttributes.length()); - IntlUtil::initUnicodeCollation(&tt, &cs, "UNICODE", 0, collAttributesBuffer, string()); + texttype tt; + if (!IntlUtil::initUnicodeCollation(&tt, &cs, "UNICODE", 0, collAttributesBuffer, string())) + fatal_exception::raiseFmt("cannot initialize UNICODE collation to use in trace plugin"); + AutoPtr charSet(Jrd::CharSet::createInstance(*getDefaultMemoryPool(), 0, &cs)); Jrd::TextType textType(0, &tt, charSet); diff --git a/src/utilities/ntrace/TracePluginImpl.cpp b/src/utilities/ntrace/TracePluginImpl.cpp index 339e148041..390b8b5407 100644 --- a/src/utilities/ntrace/TracePluginImpl.cpp +++ b/src/utilities/ntrace/TracePluginImpl.cpp @@ -138,7 +138,10 @@ TracePluginImpl::TracePluginImpl(const TracePluginConfig &configuration, TraceIn } IntlUtil::initUtf8Charset(&cs); - IntlUtil::initUnicodeCollation(&tt, &cs, "UNICODE", 0, UCharBuffer(), string()); + + if (!IntlUtil::initUnicodeCollation(&tt, &cs, "UNICODE", 0, UCharBuffer(), string())) + fatal_exception::raiseFmt("cannot initialize UNICODE collation to use in trace plugin"); + charSet = Jrd::CharSet::createInstance(*getDefaultMemoryPool(), 0, &cs); textType = FB_NEW(*getDefaultMemoryPool()) Jrd::TextType(0, &tt, charSet);