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

Method transliterate

src/jrd/cvt.cpp:460–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458
459
460bool EngineCallbacks::transliterate(const dsc* from, dsc* to, CHARSET_ID& charset2)
461{
462 CHARSET_ID charset1;
463 if (INTL_TTYPE(from) == ttype_dynamic)
464 charset1 = INTL_charset(NULL, INTL_TTYPE(from));
465 else
466 charset1 = INTL_TTYPE(from);
467
468 if (INTL_TTYPE(to) == ttype_dynamic)
469 charset2 = INTL_charset(NULL, INTL_TTYPE(to));
470 else
471 charset2 = INTL_TTYPE(to);
472
473 // The charset[12] can be ttype_dynamic only if we are
474 // outside the engine. Within the engine INTL_charset
475 // would have set it to the ttype of the attachment
476
477 if ((charset1 != charset2) &&
478 (charset2 != ttype_none) &&
479 (charset1 != ttype_binary) &&
480 (charset2 != ttype_binary) &&
481 (charset1 != ttype_dynamic) && (charset2 != ttype_dynamic))
482 {
483 INTL_convert_string(to, from, this);
484 return true;
485 }
486
487 return false;
488}
489
490
491CharSet* EngineCallbacks::getToCharset(CHARSET_ID charSetId)

Callers

nothing calls this directly

Calls 2

INTL_charsetFunction · 0.85
INTL_convert_stringFunction · 0.85

Tested by

no test coverage detected