Hubbub $Id$
detect.h
Go to the documentation of this file.
1/*
2 * This file is part of Hubbub.
3 * Licensed under the MIT License,
4 * http://www.opensource.org/licenses/mit-license.php
5 * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
6 */
7
8#ifndef hubbub_charset_detect_h_
9#define hubbub_charset_detect_h_
10
11#include <inttypes.h>
12
13#include <parserutils/errors.h>
14
15/* Extract a charset from a chunk of data */
16parserutils_error hubbub_charset_extract(const uint8_t *data, size_t len,
17 uint16_t *mibenum, uint32_t *source);
18
19/* Parse a Content-Type string for an encoding */
20uint16_t hubbub_charset_parse_content(const uint8_t *value,
21 uint32_t valuelen);
22
23/* Fix up frequently misused character sets */
24void hubbub_charset_fix_charset(uint16_t *charset);
25
26#endif
27
parserutils_error hubbub_charset_extract(const uint8_t *data, size_t len, uint16_t *mibenum, uint32_t *source)
Extract a charset from a chunk of data.
Definition: detect.c:44
void hubbub_charset_fix_charset(uint16_t *charset)
Fix charsets, according to the override table in HTML5, section 8.2.2.2.
Definition: detect.c:682
uint16_t hubbub_charset_parse_content(const uint8_t *value, uint32_t valuelen)
Parse a content= attribute's value.
Definition: detect.c:369
size_t len
Definition: initial.c:23