Defines | |
#define | CHUNK_ALLOC 4 |
Functions | |
iconv_t | tds_sys_iconv_open (const char *tocode, const char *fromcode) |
Inputs are FreeTDS canonical names, no other. | |
int | tds_sys_iconv_close (iconv_t cd) |
size_t | tds_sys_iconv (iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) |
void | tds_iconv_open (TDSSOCKET *tds, const char *charset) |
void | tds_iconv_close (TDSSOCKET *tds) |
void | tds_iconv_free (TDSSOCKET *tds) |
size_t | tds_iconv (TDSSOCKET *tds, const TDSICONV *conv, TDS_ICONV_DIRECTION io, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) |
Wrapper around iconv(3). | |
size_t | tds_iconv_fread (iconv_t cd, FILE *stream, size_t field_len, size_t term_len, char *outbuf, size_t *outbytesleft) |
Read a data file, passing the data through iconv(). | |
void | tds_srv_charset_changed (TDSSOCKET *tds, const char *charset) |
void | tds7_srv_charset_changed (TDSSOCKET *tds, int sql_collate, int lcid) |
const char * | tds_canonical_charset_name (const char *charset_name) |
Determine canonical iconv character set name. | |
const char * | tds_sybase_charset_name (const char *charset_name) |
Determine the name Sybase uses for a character set, given a canonical iconv name. | |
TDSICONV * | tds_iconv_from_collate (TDSSOCKET *tds, int sql_collate, int lcid) |
Get iconv information from a LCID (to support different column encoding under MSSQL2K). |
Set up the initial iconv conversion descriptors. When the socket is allocated, three TDSICONV structures are attached to iconv. They have fixed meanings:
To solve different iconv names and portability problem FreeTDS use a complex method. It maintain a list of all alias of a given charset. First it discover some needed charset (UTF-8, ISO8859-1 and UCS2) and then try to discover others from those characters (this discover happen only when required).
There are a list of canonic names (GNU iconv names) and a set of aliases (one for others iconv implementations and another for Sybase). For every canonic charset name we cache iconv name found during discovery.
|
Determine canonical iconv character set name.
|
|
Wrapper around iconv(3). Same parameters, with slightly different behavior.
|
|
Read a data file, passing the data through iconv().
|
|
Determine the name Sybase uses for a character set, given a canonical iconv name.
|
|
Inputs are FreeTDS canonical names, no other. No alias list is consulted. |