ifx_gl_conv_needed - determines whether code set conversion between two
code sets is required
SYNOPSIS
#include <ifxgls.h>
int ifx_gl_conv_needed(char *dstcodeset, char *srccodeset)
DESCRIPTION
This function determines whether characters encoded in srccodeset would
require conversion to dstcodeset by using ifx_gl_cv_mconv(). It is not enough to simply compare the names of the code sets
since for example, "8859-1", "819", and "Latin-1" refer to the same code set.
The codesets, srccodeset
and dstcodeset, may be locale specifiers
(for example, "de_de.8859-1" or "ja_jp.ujis") or code set names found in the file $INFORMIXDIR/gls/cmX/registry (for example, "8859-1" or "ujis"). The
macro, IFX_GL_PROC_CS, may be passed
as srccodeset
or dstcodeset to specify the code set of the current processing locale.
Depending on the context, the value of IFX_GL_PROC_CS is based on either the
client's environment, or the database which the server is currently accessing.
RETURN VALUES
This function returns 1 if conversion is needed, 0 if it
isn't, and -1 if an error occurred.
ERRORS
If an error has occurred, this function returns -1 and
ifx_gl_lc_errno() returns
one of the following,
- [IFX_GL_EINVAL]
- The input string is not a valid locale specification or codeset name,
or the codeset name could not be mapped to a codeset number
- [IFX_GL_EBADF]
- Can not find the code set registry
- [IFX_GL_BADFILEFORM]
- Bad format found in the registry
SEE ALSO
IFX_GL_PROC_CS
ifx_gl_cv_mconv()
ifx_gl_cv_outbuflen()
ifx_gl_cv_sb2sb_table()
ACKNOWLEDGEMENT
Portions of this description were derived from the X/Open CAE
Specification: "System Interfaces and Headers, Issue 4"; X/Open
Document Number: C202; ISBN: 1-872630-47-2; Published by X/Open Company
Ltd., U.K.