Akira's Commentary


What is libiconv

In some UNIXes, there is 'iconv' library, as generic multi-lingual character code, encoding coversion. If you are handling UTF-8, UTF-16, it is nearly standard library for handling such code.

As I developed some program using 'iconv' library on OS/2, I ported free (LGPL) implementation of 'iconv' library, Mr. Bruno Haible's 'libiconv' into OS/2 (2). See this table for current supporting character set and encodings.

Now, new version, 'libiconv-1.4' was released, and it now contains OS/2 support (based on my previous patch) in it. So, I re-write this page and moved old content into old page. If you interested how libiconv was ported, see old page. If you want to use 'iconv' library without building from source, then continue on.

Binary Package

I prepared binary package here (1).

It contains header, import libraries (.a and .lib) and DLL. Also contains 'iconv.exe' (from tests directory) as simple conversion program.

Usage of iconv is quite simple.

iconv -f From-Encoding -t To-Encoding < From-File > To-File

Encodings supported with libiconv-1.4 is listed in Table of Encodings

Build from Source

New version 1.4 contains guide to build libiconv on OS/2. See 'README.os2' in the source archive.

Source and command files in the archive are written in UNIX text format. It generally no problem if you build, install libiconv on OS/2. But if you try test the library (make -f Makefile.os2 check), REXX scripts in the 'tests' directory causes runtime error on their execution. So, first convert following scripts in 'tests' directory into DOS text format.

      check-stateful.cmd
      check-stateless.cmd
      check-translit.cmd