23#ifndef _NETSURF_UTILS_UTF8_H_
24#define _NETSURF_UTILS_UTF8_H_
109size_t utf8_next(
const char *s,
size_t l,
size_t o);
122 size_t len,
char **
result);
135 size_t len,
char **
result,
size_t *result_len);
148 size_t len,
char **
result);
nserror
Enumeration of error codes.
size_t utf8_prev(const char *s, size_t o)
Find previous legal UTF-8 char in string.
nserror utf8_finalise(void)
Finalise the UTF-8 library.
size_t utf8_from_ucs4(uint32_t c, char *s)
Convert a single UCS4 character into a UTF-8 multibyte sequence.
size_t utf8_next(const char *s, size_t l, size_t o)
Find next legal UTF-8 char in string.
bool utf8_save_text(const char *utf8_text, const char *path)
Save the given utf8 text to a file, converting to local encoding.
uint32_t utf8_to_ucs4(const char *s, size_t l)
Convert a UTF-8 multibyte sequence into a single UCS4 character.
size_t utf8_bounded_length(const char *s, size_t l)
Calculated the length (in characters) of a bounded UTF-8 string.
nserror utf8_from_enc(const char *string, const char *encname, size_t len, char **result, size_t *result_len)
Convert a string in the named encoding into a UTF-8 string.
size_t utf8_length(const char *s)
Calculate the length (in characters) of a NULL-terminated UTF-8 string.
nserror utf8_to_enc(const char *string, const char *encname, size_t len, char **result)
Convert a UTF8 string into the named encoding.
nserror utf8_to_html(const char *string, const char *encname, size_t len, char **result)
Convert a UTF-8 encoded string into a string of the given encoding, applying HTML escape sequences wh...
size_t utf8_char_byte_length(const char *s)
Calculate the length (in bytes) of a UTF-8 character.
size_t utf8_bounded_byte_length(const char *s, size_t l, size_t c)
Calculate the length (in bytes) of a bounded UTF-8 string.
static nserror path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
Plots a path.