#include "lightmediascanner_charset_conv.h"
#include <iconv.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
Go to the source code of this file.
Functions | |
lms_charset_conv_t * | lms_charset_conv_new_full (int use_check, int use_fallback) |
lms_charset_conv_t * | lms_charset_conv_new (void) |
void | lms_charset_conv_free (lms_charset_conv_t *lcc) |
int | lms_charset_conv_add (lms_charset_conv_t *lcc, const char *charset) |
int | lms_charset_conv_del (lms_charset_conv_t *lcc, const char *charset) |
int | lms_charset_conv (lms_charset_conv_t *lcc, char **p_str, unsigned int *p_len) |
int | lms_charset_conv_force (lms_charset_conv_t *lcc, char **p_str, unsigned int *p_len) |
int | lms_charset_conv_check (lms_charset_conv_t *lcc, const char *str, unsigned int len) |
int lms_charset_conv | ( | lms_charset_conv_t * | lcc, | |
char ** | p_str, | |||
unsigned int * | p_len | |||
) |
If required, do charset conversion to UTF-8.
lcc | existing Light Media Scanner charset conversion. | |
p_str | string to be converted. | |
p_len | string size. |
Definition at line 328 of file lightmediascanner_charset_conv.c.
int lms_charset_conv_add | ( | lms_charset_conv_t * | lcc, | |
const char * | charset | |||
) |
Register new charset to conversion tool.
lcc | existing Light Media Scanner charset conversion. | |
charset | charset name as understood by iconv_open(3). |
Definition at line 145 of file lightmediascanner_charset_conv.c.
Referenced by lms_charset_add().
int lms_charset_conv_check | ( | lms_charset_conv_t * | lcc, | |
const char * | str, | |||
unsigned int | len | |||
) |
Check if strings is not UTF-8 and conversion is required.
lcc | existing Light Media Scanner charset conversion. | |
str | string to be analysed. | |
len | string size. |
Definition at line 440 of file lightmediascanner_charset_conv.c.
int lms_charset_conv_del | ( | lms_charset_conv_t * | lcc, | |
const char * | charset | |||
) |
Forget about previously registered charset in conversion tool.
lcc | existing Light Media Scanner charset conversion. | |
charset | charset name. |
Definition at line 211 of file lightmediascanner_charset_conv.c.
Referenced by lms_charset_del().
int lms_charset_conv_force | ( | lms_charset_conv_t * | lcc, | |
char ** | p_str, | |||
unsigned int * | p_len | |||
) |
Forcefully do charset conversion to UTF-8.
lcc | existing Light Media Scanner charset conversion. | |
p_str | string to be converted. | |
p_len | string size. |
Definition at line 386 of file lightmediascanner_charset_conv.c.