MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / toUtf8

Method toUtf8

src/dsql/dsql.cpp:704–724  ·  view source on GitHub ↗

Return as UTF8

Source from the content-addressed store, hash-verified

702
703// Return as UTF8
704string IntlString::toUtf8(jrd_tra* transaction) const
705{
706 CHARSET_ID id = CS_dynamic;
707
708 if (charset.hasData())
709 {
710 const dsql_intlsym* resolved = METD_get_charset(transaction, charset.length(), charset.c_str());
711
712 if (!resolved)
713 {
714 // character set name is not defined
715 ERRD_post(Arg::Gds(isc_sqlerr) << Arg::Num(-504) <<
716 Arg::Gds(isc_charset_not_found) << charset);
717 }
718
719 id = resolved->intlsym_charset_id;
720 }
721
722 string utf;
723 return DataTypeUtil::convertToUTF8(s, utf, id, ERRD_post) ? utf : s;
724}
725
726
727/**

Callers 3

startMethod · 0.45
attachServiceManagerMethod · 0.45

Calls 6

ERRD_postFunction · 0.85
GdsClass · 0.85
NumClass · 0.85
hasDataMethod · 0.45
lengthMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected