The ifx_gl_cv_sb2sb_table() function
The ifx_gl_cv_sb2sb_table() function returns the single-byte conversion table from the source code set to the destination code set.
Syntax
#include <ifxgls.h>
...
int ifx_gl_cv_sb2sb_table(dst_codeset, src_codeset, array)
char *dst_codeset;
char *src_codeset;
unsigned char **array;
- dst_codeset
- A pointer to the name of the destination (target) code set.
- src_codeset
- A pointer to the name of the source code set.
- array
- A pointer to a variable that points to a table of unsigned char values representing the conversion
Valid in client application | Valid in DataBlade® UDR |
---|---|
Yes | Yes |
Usage
If the code-set conversion from src_codeset to dst_codeset converts from one single-byte code set to another single-byte code set (where no substitution conversions occur), the ifx_gl_cv_sb2sb_table() function sets array to an array of 256 unsigned char values that represent the conversion. If the code-set conversion is not of this form, the function sets array to NULL.
The
code sets, src_codeset and dst_codeset,
can be any of the following:
- Locale names
- Code-set names
- The IFX_GL_PROC_CS macro
Return values
- 0
- The function was successful, and the array argument points to the conversion table.
- -1
- The function was not successful, and the error number is set to indicate the cause. See the Errors section.
Errors
If an error occurred, this function
returns -1 and sets the ifx_gl_lc_errno() error
number to the following value.
- IFX_GL_FILEERR
- Retrieval of the conversion information for the specified code sets failed. This failure might be due to invalid code-set names, a missing registry file, a missing code-set-conversion object file or one with an incorrect format, or insufficient memory for the code-set-conversion object.