#include <errno.h>
#include <stdint.h>
#include <sys/param.h>
Go to the source code of this file.
Data Structures | |
struct | atalk_iconv_t |
struct | charset_functions |
Macros | |
#define | ucs2_t uint16_t |
#define | SAFE_FREE(x) |
#define | EILSEQ 84 /* Illegal byte sequence. */ |
#define | CHARSET_CLIENT 1 |
#define | CHARSET_VOLUME 2 |
#define | CHARSET_PRECOMPOSED 4 |
#define | CHARSET_DECOMPOSED 8 |
#define | CHARSET_MULTIBYTE 16 |
#define | CHARSET_WIDECHAR 32 |
#define | CHARSET_ICONV 64 |
#define | IGNORE_CHAR '_' |
#define | CONV_IGNORE (1<<0) |
#define | CONV_ESCAPEHEX (1<<1) |
#define | CONV_ESCAPEDOTS (1<<2) |
#define | CONV_UNESCAPEHEX (1<<3) |
#define | CONV_TOUPPER (1<<4) |
#define | CONV_TOLOWER (1<<5) |
#define | CONV_PRECOMPOSE (1<<6) |
#define | CONV_DECOMPOSE (1<<7) |
#define | CONV_FORCE (1<<8) |
#define | CONV__EILSEQ (1<<9) |
#define | CONV_REQMANGLE (1<<14) |
#define | CONV_REQESCAPE (1<<15) |
#define | NUM_CHARSETS 5 |
Enumerations | |
enum | charset_t { CH_UCS2 = 0 , CH_UTF8 = 1 , CH_MAC = 2 , CH_UNIX = 3 , CH_UTF8_MAC = 4 } |
Functions | |
atalk_iconv_t | atalk_iconv_open (const char *, const char *) |
size_t | atalk_iconv (atalk_iconv_t, const char **, size_t *, char **, size_t *) |
int | atalk_iconv_close (atalk_iconv_t) |
struct charset_functions * | find_charset_functions (const char *) |
int | atalk_register_charset (struct charset_functions *) |
ucs2_t | toupper_w (ucs2_t) |
uint32_t | toupper_sp (uint32_t) |
ucs2_t | tolower_w (ucs2_t) |
uint32_t | tolower_sp (uint32_t) |
int | strupper_w (ucs2_t *) |
int | strlower_w (ucs2_t *) |
int | islower_w (ucs2_t) |
int | isupper_w (ucs2_t) |
size_t | strlen_w (const ucs2_t *) |
size_t | strnlen_w (const ucs2_t *, size_t) |
ucs2_t * | strchr_w (const ucs2_t *, ucs2_t) |
ucs2_t * | strcasechr_w (const ucs2_t *s, ucs2_t c) |
int | strcmp_w (const ucs2_t *, const ucs2_t *) |
int | strncmp_w (const ucs2_t *, const ucs2_t *, size_t) |
int | strcasecmp_w (const ucs2_t *, const ucs2_t *) |
int | strncasecmp_w (const ucs2_t *, const ucs2_t *, size_t) |
ucs2_t * | strstr_w (const ucs2_t *s, const ucs2_t *ins) |
ucs2_t * | strcasestr_w (const ucs2_t *, const ucs2_t *) |
ucs2_t * | strndup_w (const ucs2_t *, size_t) |
ucs2_t * | strdup_w (const ucs2_t *) |
ucs2_t * | strncpy_w (ucs2_t *, const ucs2_t *, const size_t) |
ucs2_t * | strncat_w (ucs2_t *, const ucs2_t *, const size_t) |
ucs2_t * | strcat_w (ucs2_t *, const ucs2_t *) |
size_t | precompose_w (ucs2_t *, size_t, ucs2_t *, size_t *) |
size_t | decompose_w (ucs2_t *, size_t, ucs2_t *, size_t *) |
int | set_charset_name (charset_t, const char *) |
void | free_charset_names (void) |
void | init_iconv (void) |
size_t | convert_string (charset_t, charset_t, void const *, size_t, void *, size_t) |
size_t | convert_string_allocate (charset_t, charset_t, void const *, size_t, char **) |
size_t | charset_strupper (charset_t, const char *, size_t, char *, size_t) |
size_t | charset_strlower (charset_t, const char *, size_t, char *, size_t) |
size_t | ucs2_to_charset_allocate (charset_t, char **dest, const ucs2_t *src) |
size_t | ucs2_to_charset (charset_t, const ucs2_t *src, char *dest, size_t) |
size_t | convert_charset (charset_t, charset_t, charset_t, const char *, size_t, char *, size_t, uint16_t *) |
size_t | charset_precompose (charset_t, char *, size_t, char *, size_t) |
size_t | charset_decompose (charset_t, char *, size_t, char *, size_t) |
charset_t | add_charset (const char *name) |
#define CHARSET_CLIENT 1 |
#define CHARSET_DECOMPOSED 8 |
#define CHARSET_ICONV 64 |
#define CHARSET_MULTIBYTE 16 |
#define CHARSET_PRECOMPOSED 4 |
#define CHARSET_VOLUME 2 |
#define CHARSET_WIDECHAR 32 |
#define CONV__EILSEQ (1<<9) |
#define CONV_DECOMPOSE (1<<7) |
#define CONV_ESCAPEDOTS (1<<2) |
#define CONV_ESCAPEHEX (1<<1) |
#define CONV_FORCE (1<<8) |
#define CONV_IGNORE (1<<0) |
#define CONV_PRECOMPOSE (1<<6) |
#define CONV_REQESCAPE (1<<15) |
#define CONV_REQMANGLE (1<<14) |
#define CONV_TOLOWER (1<<5) |
#define CONV_TOUPPER (1<<4) |
#define CONV_UNESCAPEHEX (1<<3) |
#define EILSEQ 84 /* Illegal byte sequence. */ |
#define IGNORE_CHAR '_' |
#define NUM_CHARSETS 5 |
#define SAFE_FREE | ( | x | ) |
#define ucs2_t uint16_t |
enum charset_t |
|
extern |
|
extern |
This is a simple portable iconv() implementaion.
It only knows about a very small number of character sets - just enough that netatalk works on systems that don't have iconv.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Initialize iconv conversion descriptors.
This is called the first time it is needed, and also called again every time the configuration is reloaded, because the charset or codepage might have changed.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Copy a string from a UCS2 src to a unix char * destination, allocating a buffer
dest | always set at least to NULL |