Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  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 */
  16. parserutils_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 */
  20. uint16_t hubbub_charset_parse_content(const uint8_t *value,
  21.                 uint32_t valuelen);
  22.  
  23. /* Fix up frequently misused character sets */
  24. void hubbub_charset_fix_charset(uint16_t *charset);
  25.  
  26. #endif
  27.  
  28.