45 #define YAZ_ICONV_UNKNOWN 1
47 #define YAZ_ICONV_E2BIG 2
49 #define YAZ_ICONV_EILSEQ 3
51 #define YAZ_ICONV_EINVAL 4
57 char **outbuf,
size_t *outbytesleft);
81 char **outbuf,
size_t *outbytesleft,
86 #define yaz_isdigit(x) ((x) >= '0' && (x) <= '9')
87 #define yaz_isspace(x) strchr(" \f\r\n\t\v", x)
88 #define yaz_toupper(x) ((x) + ('A' - 'a'))
89 #define yaz_isupper(x) ((x) >= 'A' && (x) <= 'Z')
90 #define yaz_tolower(x) ((x) + ('a' - 'A'))
91 #define yaz_islower(x) ((x) >= 'a' && (x) <= 'z')
size_t yaz_iconv(yaz_iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
just like iconv(3)
int yaz_iconv_close(yaz_iconv_t cd)
just like iconv_close(3)
int yaz_iconv_isbuiltin(yaz_iconv_t cd)
tests whether conversion is handled by YAZ' iconv or system iconv
int yaz_iconv_error(yaz_iconv_t cd)
returns last error - like errno for iconv(3)
yaz_iconv_t yaz_iconv_open(const char *tocode, const char *fromcode)
just like iconv_open(3)
int yaz_utf8_check(const char *cstr)
check whether string apppers to be UTF-8 encoded
size_t yaz_write_UTF8_char(unsigned long x, char **outbuf, size_t *outbytesleft, int *error)
encodes UTF-8 sequence
struct yaz_iconv_struct * yaz_iconv_t
yaz_iconv handle (similar to iconv_t)
unsigned long yaz_read_UTF8_char(const unsigned char *inp, size_t inbytesleft, size_t *no_read, int *error)
Header with fundamental macros.