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

Function INTL_convert_lookup

src/jrd/intl.cpp:748–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746
747
748CsConvert INTL_convert_lookup(thread_db* tdbb, CHARSET_ID to_cs, CHARSET_ID from_cs)
749{
750/**************************************
751 *
752 * I N T L _ c o n v e r t _ l o o k u p
753 *
754 **************************************
755 *
756 * Functional description
757 *
758 **************************************/
759
760 SET_TDBB(tdbb);
761 Database* dbb = tdbb->getDatabase();
762 CHECK_DBB(dbb);
763
764 if (from_cs == CS_dynamic)
765 from_cs = tdbb->getCharSet();
766
767 if (to_cs == CS_dynamic)
768 to_cs = tdbb->getCharSet();
769
770 // Should from_cs == to_cs? be handled better? YYY
771
772 fb_assert(from_cs != CS_dynamic);
773 fb_assert(to_cs != CS_dynamic);
774
775 CharSetContainer* charset = CharSetContainer::lookupCharset(tdbb, from_cs);
776
777 return charset->lookupConverter(tdbb, to_cs);
778}
779
780
781void INTL_convert_string(dsc* to, const dsc* from, Firebird::Callbacks* cb)

Callers 4

Re2SimilarMatcherMethod · 0.85
INTL_convert_bytesFunction · 0.85

Calls 5

SET_TDBBFunction · 0.85
CHECK_DBBFunction · 0.85
getDatabaseMethod · 0.80
lookupConverterMethod · 0.80
getCharSetMethod · 0.45

Tested by

no test coverage detected