Charset utilities
[Utilities]


Typedefs

typedef struct
bg_charset_converter_s 
bg_charset_converter_t
 Opaque charset converter.

Functions

bg_charset_converter_tbg_charset_converter_create (const char *in_charset, const char *out_charset)
 Create a charset converter.
void bg_charset_converter_destroy (bg_charset_converter_t *cnv)
 Destroy a charset converter.
char * bg_convert_string (bg_charset_converter_t *cnv, const char *in_string, int in_len, int *out_len)
 Convert a string.

Typedef Documentation

typedef struct bg_charset_converter_s bg_charset_converter_t

Opaque charset converter.

You don't want to know, what's inside


Function Documentation

bg_charset_converter_t* bg_charset_converter_create ( const char *  in_charset,
const char *  out_charset 
)

Create a charset converter.

Parameters:
in_charset Input character set
out_charset Output character set
Returns:
A newly allocated charset converte
in_charset and out_charset must be supported by iconv (type iconv -l for a list).

void bg_charset_converter_destroy ( bg_charset_converter_t cnv  ) 

Destroy a charset converter.

Parameters:
cnv A charset converter

char* bg_convert_string ( bg_charset_converter_t cnv,
const char *  in_string,
int  in_len,
int *  out_len 
)

Convert a string.

Parameters:
cnv A charset converter
in_string Input string
in_len Length of input string or -1
out_len If non NULL, returns the length of the output string
Returns:
A newly allocated string


Generated on Sat Aug 22 01:28:05 2009 for gmerlin by  doxygen 1.5.9