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

Function encode_utf8_3

test/main.c:366–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366void encode_utf8_3(uint8_t *data, uint32_t i) {
367 i = i & 0xffff;
368 data[0] = 0xe0 + (i >> 12);
369 data[1] = 0x80 + ((i >> 6) & 0x3f);
370 data[2] = 0x80 + (i & 0x3f);
371}
372
373void encode_utf8_4(uint8_t *data, uint32_t i) {
374 i = i & 0x10ffff;

Callers 1

main_utf8_decoder_testsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected