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