Main Page   Modules   Namespace List   Data Structures   File List   Data Fields   Globals   Related Pages  

I18N translation library


Defines

#define APR_DEFAULT_CHARSET   (const char *)0
#define APR_LOCALE_CHARSET   (const char *)1

Typedefs

typedef apr_xlate_t apr_xlate_t

Functions

apr_status_t apr_xlate_open (apr_xlate_t **convset, const char *topage, const char *frompage, apr_pool_t *pool)
apr_status_t apr_xlate_sb_get (apr_xlate_t *convset, int *onoff)
apr_status_t apr_xlate_get_sb (apr_xlate_t *convset, int *onoff)
apr_status_t apr_xlate_conv_buffer (apr_xlate_t *convset, const char *inbuf, apr_size_t *inbytes_left, char *outbuf, apr_size_t *outbytes_left)
apr_int32_t apr_xlate_conv_byte (apr_xlate_t *convset, unsigned char inchar)
apr_status_t apr_xlate_close (apr_xlate_t *convset)

Define Documentation

#define APR_DEFAULT_CHARSET   (const char *)0
 

This is to indicate the charset of the sourcecode at compile time names to indicate the charset of the source code at compile time. This is useful if there are literal strings in the source code which must be translated according to the charset of the source code.

#define APR_LOCALE_CHARSET   (const char *)1
 

To indicate charset names of the current locale


Typedef Documentation

typedef struct apr_xlate_t apr_xlate_t
 

Opaque translation buffer


Function Documentation

apr_status_t apr_xlate_close apr_xlate_t   convset
 

Close a codepage translation handle.

Parameters:
convset  The codepage translation handle to close
Remarks:
Return APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).

apr_status_t apr_xlate_conv_buffer apr_xlate_t   convset,
const char *    inbuf,
apr_size_t *    inbytes_left,
char *    outbuf,
apr_size_t *    outbytes_left
 

Convert a buffer of text from one codepage to another.

Parameters:
convset  The handle allocated by apr_xlate_open, specifying the parameters of conversion
inbuf  The address of the source buffer
inbytes_left  Input: the amount of input data to be translated Output: the amount of input data not yet translated
outbuf  The address of the destination buffer
outbytes_left  Input: the size of the output buffer Output: the amount of the output buffer not yet used
Remarks:
Return APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).

apr_int32_t apr_xlate_conv_byte apr_xlate_t   convset,
unsigned char    inchar
 

Convert a single-byte character from one charset to another.

Parameters:
convset  The handle allocated by apr_xlate_open, specifying the parameters of conversion
inchar  The single-byte character to convert.
Warning:
This only works when converting between single-byte character sets. -1 will be returned if the conversion can't be performed.

apr_status_t apr_xlate_get_sb apr_xlate_t   convset,
int *    onoff
 

Deprecated:
See also:
apr_xlate_sb_get

apr_status_t apr_xlate_open apr_xlate_t **    convset,
const char *    topage,
const char *    frompage,
apr_pool_t *    pool
 

Set up for converting text from one charset to another.

Parameters:
convset  The handle to be filled in by this function
topage  The name of the target charset
frompage  The name of the source charset
pool  The pool to use
Remarks:
Specify APR_DEFAULT_CHARSET for one of the charset names to indicate the charset of the source code at compile time. This is useful if there are literal strings in the source code which must be translated according to the charset of the source code. APR_DEFAULT_CHARSET is not useful if the source code of the caller was not encoded in the same charset as APR at compile time.
Remarks:
Specify APR_LOCALE_CHARSET for one of the charset names to indicate the charset of the current locale.
Remarks:
Return APR_EINVAL if unable to procure a convset, or APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util at all (i.e., APR_HAS_XLATE is undefined).

apr_status_t apr_xlate_sb_get apr_xlate_t   convset,
int *    onoff
 

Find out whether or not the specified conversion is single-byte-only.

Parameters:
convset  The handle allocated by apr_xlate_open, specifying the parameters of conversion
onoff  Output: whether or not the conversion is single-byte-only
Remarks:
Return APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).


Generated on Sat Nov 1 12:58:17 2003 for Apache Portable Runtime Utility Library by doxygen1.2.18