hc
2024-03-26 e0728245c89800c2038c23308f2d88969d5b41c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Copyright (c) 2009-2016 Petri Lehtinen <petri@digip.org>
 *
 * Jansson is free software; you can redistribute it and/or modify
 * it under the terms of the MIT license. See LICENSE for details.
 */
 
#ifndef UTF_H
#define UTF_H
 
#ifdef HAVE_CONFIG_H
#include <jansson_private_config.h>
#endif
 
#include <stddef.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
 
int utf8_encode(int32_t codepoint, char *buffer, size_t *size);
 
size_t utf8_check_first(char byte);
size_t utf8_check_full(const char *buffer, size_t size, int32_t *codepoint);
const char *utf8_iterate(const char *buffer, size_t size, int32_t *codepoint);
 
int utf8_check_string(const char *string, size_t length);
 
#endif