15 std::vector<uint8_t>
encodeUtf8(
const std::string& value) {
16 std::vector<uint8_t> result;
20 const uint8_t* start =
reinterpret_cast<const uint8_t*
>(value.c_str());
21 std::vector<uint8_t> binary(start, start + value.size());
22 for (uint8_t ch : binary) {
26 result.push_back(0xc0 | (ch >> 6));
27 result.push_back(0x80 | (ch & 0x3f));
std::vector< uint8_t > encodeUtf8(const std::string &value)
Encode value string into UTF-8.
Defines the logger used by the top-level component of kea-dhcp-ddns.