@{
When the socket is allocated, three TDSICONV structures are attached to iconv. They have fixed meanings:
To solve different iconv names and portability problems FreeTDS maintains a list of aliases each charset.
First we discover the names of our minimum required charsets (UTF-8, ISO8859-1 and UCS2). Later, as and when it's needed, we try to discover others.
There is one list of canonic names (GNU iconv names) and two sets of aliases (one for other iconv implementations and another for Sybase). For every canonic charset name we cache the iconv name found during discovery.