/*1* Copyright (c) 2009-2013 Petri Lehtinen <[email protected]>2*3* Jansson is free software; you can redistribute it and/or modify4* it under the terms of the MIT license. See LICENSE for details.5*/67#ifndef UTF_H8#define UTF_H910#ifdef HAVE_CONFIG_H11#include <config.h>1213#ifdef HAVE_INTTYPES_H14/* inttypes.h includes stdint.h in a standard environment, so there's15no need to include stdint.h separately. If inttypes.h doesn't define16int32_t, it's defined in config.h. */17#include <inttypes.h>18#endif /* HAVE_INTTYPES_H */1920#else /* !HAVE_CONFIG_H */21#ifdef _WIN3222typedef int int32_t;23#else /* !_WIN32 */24/* Assume a standard environment */25#include <inttypes.h>26#endif /* _WIN32 */2728#endif /* HAVE_CONFIG_H */2930int utf8_encode(int codepoint, char *buffer, int *size);3132int utf8_check_first(char byte);33int utf8_check_full(const char *buffer, int size, int32_t *codepoint);34const char *utf8_iterate(const char *buffer, int32_t *codepoint);3536int utf8_check_string(const char *string, int length);3738#endif394041