Skip to main content

Name

ec_convert_buffer — Convert a fixed length buffer from one encoding to another

Synopsis

#include "misc/converter.h"

| int **ec_convert_buffer** ( | fromcode, |   | |   | frombuf, |   | |   | frombuflen, |   | |   | tocode, |   | |   | tobuf, |   | |   | tobuflen, |   | |   | bytes_consumed, |   | |   | bytes_produced); |   |

const char * <var class="pdparam">fromcode</var>; const char * <var class="pdparam">frombuf</var>; size_t <var class="pdparam">frombuflen</var>; const char * <var class="pdparam">tocode</var>; char * <var class="pdparam">tobuf</var>; size_t <var class="pdparam">tobuflen</var>; size_t * <var class="pdparam">bytes_consumed</var>; size_t * <var class="pdparam">bytes_produced</var>;

Description

Note

This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.

Convert a fixed length buffer from one encoding to another.

Converts data from one encoding to another using fixed length buffers.

Parameters

fromcode

the encoding used for the input data

frombuf

the source of the input data

frombuflen

the size of the source buffer

tobuf

the destination buffer

tobuflen

the size of the destination buffer

bytes_consumed

the number of bytes consumed from the source buffer.

bytes_produced

the number of bytes that wound up in the destination buffer.

Return Values

Returns ECCONV_OK on success, or some other value on error.

Was this page helpful?