|
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:
- Returns APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined). Returns APR_INCOMPLETE if the input buffer ends in an incomplete multi-byte character.
To correctly terminate the output buffer for some multi-byte character set encodings, a final call must be made to this function after the complete input string has been converted, passing the inbuf and inbytes_left parameters as NULL. (Note that this mode only works from version 1.1.0 onwards) |