Charset Conversion


Typedefs

typedef struct lms_charset_conv lms_charset_conv_t

Functions

API lms_charset_conv_tlms_charset_conv_new_full (int use_check, int use_fallback) GNUC_MALLOC GNUC_WARN_UNUSED_RESULT
API lms_charset_conv_tlms_charset_conv_new (void) GNUC_MALLOC GNUC_WARN_UNUSED_RESULT
API void lms_charset_conv_free (lms_charset_conv_t *lcc) GNUC_NON_NULL(1)
API int lms_charset_conv_add (lms_charset_conv_t *lcc, const char *charset) GNUC_NON_NULL(1
API int API int lms_charset_conv_del (lms_charset_conv_t *lcc, const char *charset) GNUC_NON_NULL(1
API int API int API int lms_charset_conv (lms_charset_conv_t *lcc, char **p_str, unsigned int *p_len) GNUC_NON_NULL(1
API int API int API int API int lms_charset_conv_force (lms_charset_conv_t *lcc, char **p_str, unsigned int *p_len) GNUC_NON_NULL(1
API int API int API int API
int API int 
lms_charset_conv_check (lms_charset_conv_t *lcc, const char *str, unsigned int len) GNUC_NON_NULL(1

Detailed Description

Utilities to convert strings to UTF-8, the charset used in database.

Typedef Documentation

typedef struct lms_charset_conv lms_charset_conv_t

Definition at line 72 of file lightmediascanner_charset_conv.h.


Function Documentation

API int API int API int lms_charset_conv ( lms_charset_conv_t lcc,
char **  p_str,
unsigned int *  p_len 
)

API int lms_charset_conv_add ( lms_charset_conv_t lcc,
const char *  charset 
)

API int API int API int API int API int lms_charset_conv_check ( lms_charset_conv_t lcc,
const char *  str,
unsigned int  len 
)

API int API int lms_charset_conv_del ( lms_charset_conv_t lcc,
const char *  charset 
)

API int API int API int API int lms_charset_conv_force ( lms_charset_conv_t lcc,
char **  p_str,
unsigned int *  p_len 
)

API void lms_charset_conv_free ( lms_charset_conv_t lcc  ) 

Free existing charset conversion tool.

Parameters:
lcc existing Light Media Scanner charset conversion.

Definition at line 112 of file lightmediascanner_charset_conv.c.

Referenced by lms_free(), and lms_new().

API lms_charset_conv_t* lms_charset_conv_new ( void   ) 

Create a new charset conversion tool.

Conversion tool will try to convert provided strings to UTF-8, just need to register known charsets with lms_charset_conv_add() and then call lms_charset_conv().

Returns:
newly allocated conversion tool or NULL on error.

Definition at line 101 of file lightmediascanner_charset_conv.c.

References lms_charset_conv_new_full().

Referenced by lms_new().

Here is the call graph for this function:

API lms_charset_conv_t* lms_charset_conv_new_full ( int  use_check,
int  use_fallback 
)

Create a new charset conversion tool controlling its behavior.

Conversion tool will try to convert provided strings to UTF-8, just need to register known charsets with lms_charset_conv_add() and then call lms_charset_conv().

Returns:
newly allocated conversion tool or NULL on error.

Definition at line 47 of file lightmediascanner_charset_conv.c.

Referenced by lms_charset_conv_new().


Generated on Wed Apr 22 23:56:01 2009 for Light Media Scanner by  doxygen 1.5.8