#include "config.h"
#include "defines.h"
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <iconv.h>
#include <string.h>
#include "entitytable.h"
#include "utils.h"
Go to the source code of this file.
Functions | |
| int | utf8_to_unicode (const u_char *s, size_t n, u_int32_t *num) |
| int | is_valid_utf8_string (const u_char *str, size_t len) |
| u_char * | charset_convert (const u_char *toencode, size_t in_len, const u_char *from_charset, const u_char *to_charset, size_t *out_len_p) |
| u_char * | htmlentities (const u_char *string, int sq) |
| size_t | print_htmlentities_encoded (const u_char *string, int sq, FILE *handle) |
| u_char * | htmlentities_charset_convert (const u_char *toencode, const u_char *from, const u_char *to, size_t *outlen, int sq) |
| u_char * | charset_convert_entities (const u_char *toencode, size_t in_len, const u_char *from, const u_char *to, size_t *outlen) |
Definition in file charconvert.c.
|
||||||||||||||||||||||||
|
This function tries to convert a string from charset from_charset to charset to_charset.
Definition at line 108 of file charconvert.c. |
|
||||||||||||||||||||||||
|
This function converts a string from a given charset to a given charset. If a character cannot be shown in the target charset it would be replaced by an HTML entity. Everything else will not be touched (e.g. > will be > after calling, too).
Definition at line 400 of file charconvert.c. |
|
||||||||||||
|
This function converts HTML special characters to their entities. These are < to <, > to >, & to & and " to ". If you set the parameter sq to 1, ' will be encoded to ', too.
Definition at line 168 of file charconvert.c. |
|
||||||||||||||||||||||||
|
This function converts a string from a given charset to a given charset and encodes all html active chars (<, >, &, " and optional '). If a character doesn't exist in the target charset, the character will be replaced by an named entity (if exists) or a unicode entity.
Definition at line 259 of file charconvert.c. |
|
||||||||||||
|
This function checks if the given string is a valid UTF-8 string
Definition at line 79 of file charconvert.c. |
|
||||||||||||||||
|
This function does the same as htmlentities(), but it writes the encoded string to a file handle
Definition at line 209 of file charconvert.c. |
|
||||||||||||||||
|
This function converts a utf8 u_char string sequence to the unicode number.
Definition at line 32 of file charconvert.c. |
1.3.5