MCPcopy Create free account
hub / github.com/apache/arrow / WcsToUtf8

Function WcsToUtf8

cpp/src/arrow/flight/sql/odbc/odbc_impl/encoding.h:120–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 result->assign(data, data + length_in_bytes);
119}
120ARROW_UNSUPPRESS_DEPRECATION_WARNING
121
122inline void WcsToUtf8(const void* wcs_string, size_t length_in_code_units,
123 std::vector<uint8_t>* result) {
124 switch (GetSqlWCharSize()) {
125 case sizeof(char16_t):
126 return WcsToUtf8<char16_t>(wcs_string, length_in_code_units, result);
127 case sizeof(char32_t):
128 return WcsToUtf8<char32_t>(wcs_string, length_in_code_units, result);
129 default:
130 assert(false);
131 throw DriverException("Encoding is unsupported, SQLWCHAR size: " +
132 std::to_string(GetSqlWCharSize()));
133 }
134}
135
136inline void WcsToUtf8(const void* wcs_string, std::vector<uint8_t>* result) {
137 return WcsToUtf8(wcs_string, wcsstrlen(wcs_string), result);

Callers 2

SetAttributeSQLWCHARFunction · 0.85
SqlWcharToStringFunction · 0.85

Calls 4

GetSqlWCharSizeFunction · 0.85
DriverExceptionClass · 0.85
to_stringFunction · 0.85
wcsstrlenFunction · 0.85

Tested by

no test coverage detected