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

Method convert

src/common/isc_file.cpp:1632–1650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1630 }
1631
1632 void convert(AbstractString& str)
1633 {
1634 MutexLockGuard g(mtx, FB_FUNCTION);
1635
1636 const size_t outlength = str.length() * 4;
1637 size_t outsize = outlength;
1638 char* outbuf = toBuf.getBuffer(outsize);
1639 size_t insize = str.length();
1640 char* inbuf = str.begin();
1641 if (iconv(ic, &inbuf, &insize, &outbuf, &outsize) == (size_t) -1)
1642 {
1643 (Arg::Gds(isc_bad_conn_str) <<
1644 Arg::Gds(isc_transliteration_failed) <<
1645 Arg::Unix(errno)).raise();
1646 }
1647
1648 outsize = outlength - outsize;
1649 memcpy(str.getBuffer(outsize), toBuf.begin(), outsize);
1650 }
1651
1652private:
1653 string charmapName(const char* name)

Callers 15

toLowerMethod · 0.45
toUpperMethod · 0.45
escapeAttributeMethod · 0.45
isAttributeEscapeMethod · 0.45
lengthMethod · 0.45
substringMethod · 0.45
ISC_systemToUtf8Function · 0.45
ISC_utf8ToSystemFunction · 0.45
CharSetMethod · 0.45
TextTypeMethod · 0.45

Calls 6

GdsClass · 0.85
UnixClass · 0.85
lengthMethod · 0.45
getBufferMethod · 0.45
beginMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected