15.10 How to add new encoding


At first, the new encoding should be broken down to CCS and CES. Then, the process of adding new encoding is split to the following activities.

  1. Generate the .cct CCS file and the .c source file for the new encoding’s CCS (if it isn’t already present). To do this, the CCS source file should be had and the ’mktbl.pl’ script should be used.
  2. Write the corresponding CES converter (if it isn’t already present). Use the existing CES converters as an example.
  3. Add the corresponding entries to the ’encoding.deps’ file and regenerate the autogenerated "glue" files using the ’mkdeps.pl’ script.
  4. Don’t forget to add entries to the newlib/newlib.hin file.
  5. Of course, the ’Makefile.am’-s should also be updated (if new files were added) and the ’Makefile.in’-s should be regenerated using the correct version of ’automake’.
  6. Don’t forget to update the documentation (the list of supported encodings and CES converters).

In case a new encoding doesn’t fit to the CES/CCS decomposition model or it is desired to add the specialized (non UCS-based) conversion support, the Newlib iconv library code should be upgraded.