Main Page | Class List | File List | Class Members | File Members | Related Pages

gi_iconv.h File Reference

Functions for converting text from locale charset to UTF-8 and back. More...

Go to the source code of this file.

Functions

EXTERN_C_BEGIN LIBGIFT_EXPORT
bool 
gi_iconv_init (void)
LIBGIFT_EXPORT void gi_iconv_finish (void)
LIBGIFT_EXPORT char * gi_locale_to_utf8 (const char *locale_str)
LIBGIFT_EXPORT char * gi_utf8_to_locale (const char *utf8_str)


Detailed Description

Functions for converting text from locale charset to UTF-8 and back.


Function Documentation

LIBGIFT_EXPORT void gi_iconv_finish void   ) 
 

Closes conversion descriptors.

EXTERN_C_BEGIN LIBGIFT_EXPORT bool gi_iconv_init void   ) 
 

Initializes iconv conversion descriptors.

Returns:
true on success. false on failure.

LIBGIFT_EXPORT char* gi_locale_to_utf8 const char *  locale_str  ) 
 

Converts a string from the locale charset to utf8.

Parameters:
locale_str Zero terminated string in locale charset.
Returns:
Pointer to a newly allocated NUL-terminated utf8 string or NULL on failure. Caller frees.

LIBGIFT_EXPORT char* gi_utf8_to_locale const char *  utf8_str  ) 
 

Converts a string from utf8 to the locale charset.

Parameters:
utf8_str Zero terminated utf8 string.
Returns:
Pointer to a newly allocated NUL-terminated string in the current locale's charset or NULL on failure. Caller frees.


Generated on Sun Aug 22 07:56:40 2004 by doxygen 1.3.7