MCPcopy Create free account
hub / github.com/OISF/libhtp / encode_utf8_2

Function encode_utf8_2

test/main.c:360–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360void encode_utf8_2(uint8_t *data, uint32_t i) {
361 i = i & 0x7ff;
362 data[0] = 0xc0 + (i >> 6);
363 data[1] = 0x80 + (i & 0x3f);
364}
365
366void encode_utf8_3(uint8_t *data, uint32_t i) {
367 i = i & 0xffff;

Callers 1

main_utf8_decoder_testsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected