Table of Contents
libiconv for OS/2
os2 / libiconv for OS/2 (ver.1.3) -> Japanese Page
Last Update 2000-07-01 (Update History)
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.
Porting
What I need is (manually) pre-configured Makefiles, include files, module definition file for building OS/2 DLL, and test scripts. No modifications on the source itself.
Here's list of additonal files. They are zipped to this archive.
FILES.os2 | list of addtional files |
README.os2 | description for OS/2 port |
Makefile.os2 | pre-configure'd Makefile |
src/Makefile.os2 | |
man/Makefile.os2 | |
tests/Makefile.os2 | |
include/iconv.h.os2 | pre-configured include files |
src/config.h.os2 | |
src/iconv.def.os2 | module defintion file for OS/2 DLL |
tests/check-stateful.cmd | testscripts for OS/2 |
tests/check-stateless.cmd | |
tests/check-translit.cmd |
Build
Requires EMX/GCC (I use 0.9d, fix03) and some GNU file utils, such as "cp", "rm", "diff", "cat", "uniq". If you want to use recursive make, then you need x11make.exe make.cmd, indir.cmd, found in XFree86/2 distribution.
First, get 'libiconv' from Bruno Haible's site, and expand it in some directory (2). Also unpack OS2 patches in same directory. It contains additnal files only, and does not overwrite existing files.
To build OS2 version, simply
make -f Makefile.os2 all
at top directory (or in "src" directory).
To install libiconv's header, library (DLL & IMP) and manuals,
make -f Makefile.os2 install instroot="X:\emx"
or, manually
- in "include" directory
-
cp iconv.h X:\emx\include
- in "src" directory
-
cp iconv.dll X:\emx\dll
cp iconv.a X:\emx\lib
cp iconv.lib X:\emx\lib
- in "man" directory
-
cp iconv.3 iconv_close.3 iconv_open.3 X:\emx\man\man3
DLL was build with "-Zmt -Zcrtdll" options. So use libiconv, main program also compiled with "-Zmt -Zcrtdll" options (or short hands, "-Zmtd").
Main program should include "iconv.h". If main program compiled as ".o", link "iconv.a" import library. If main program complied with "-Zomf" (generate .obj), then link "iconv.lib" import library.
Binary Package
I also prepared OS/2 binaries here. It contains header, import libraries (.a and .lib) and DLL.
Notes
-
In documents and source code, auther's address is akira@sra.co.jp, but after retirement, it become unreachable.Please use current mail address akira@p08.itscom.net.
But after retirement, I don't have OS/2 environment at hand. So I cannot confirm any problems, or no more updates.
-
"libiconv" was first, Mr. Bruno Haible's private project, but now it was passed to GNU and maintained as GNU library. OS/2 port was done its early days, since then libiconv got many version ups, and port does not support those up-to-date versions.