Overview of iconv framework structures

The iconv framework consists of the iconv_open, iconv and iconv_close subroutines, and is based on a common core structure that is part of all converters. The core structure is initialized at the load time of the converter object module. After the loading of the converter is complete, the main entry point, which is always the instantiate subroutine, is invoked. This initializes the core structure and returns the core converter descriptor. This is further used during the call to the init subroutine provided by the converter to allocate the converter-specific structures. This init subroutine returns another converter descriptor that has a pointer to the core converter descriptor. The init subroutine allocates memory as needed and may invoke other converters if needed. The init subroutine is the place for any converter-specific initialization, whereas the instantiate subroutine is a generic entry point.

After the converter descriptor for this converter is allocated and initialized, the next step is to provide the actual code needed for the exec part of the functionality. If the converter is a table-based converter, the only need is to provide a source file format that conforms to the input needs of the genxlt utility, which takes this source table as the input and generates an output file format usable by the iconv framework.