utf8.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of LibParserUtils.
00003  * Licensed under the MIT License,
00004  *                http://www.opensource.org/licenses/mit-license.php
00005  * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
00006  */
00007 
00012 #ifndef parserutils_charset_utf8_h_
00013 #define parserutils_charset_utf8_h_
00014 
00015 #ifdef __cplusplus
00016 extern "C"
00017 {
00018 #endif
00019 
00020 #include <inttypes.h>
00021 
00022 #include <parserutils/errors.h>
00023 
00024 parserutils_error parserutils_charset_utf8_to_ucs4(const uint8_t *s, size_t len,
00025                 uint32_t *ucs4, size_t *clen);
00026 parserutils_error parserutils_charset_utf8_from_ucs4(uint32_t ucs4, uint8_t **s,
00027                 size_t *len);
00028 
00029 parserutils_error parserutils_charset_utf8_length(const uint8_t *s, size_t max,
00030                 size_t *len);
00031 parserutils_error parserutils_charset_utf8_char_byte_length(const uint8_t *s,
00032                 size_t *len);
00033 
00034 parserutils_error parserutils_charset_utf8_prev(const uint8_t *s, uint32_t off,
00035                 uint32_t *prevoff);
00036 parserutils_error parserutils_charset_utf8_next(const uint8_t *s, uint32_t len,
00037                 uint32_t off, uint32_t *nextoff);
00038 
00039 parserutils_error parserutils_charset_utf8_next_paranoid(const uint8_t *s, 
00040                 uint32_t len, uint32_t off, uint32_t *nextoff);
00041 
00042 #ifdef __cplusplus
00043 }
00044 #endif
00045 
00046 #endif
00047 

Generated on Wed Jul 29 11:59:20 2015 for Libparserutils by  doxygen 1.5.6