# libunicows

Latest version is 1.1.1, released on 2005/01/06 (see changes)

### What is libunicows?

Traditionally, win32 Unicode API was only available on Windows NT or 2000. If you wanted to take advantage of Unicode in your application and support Windows 95/98 at the same time, your only option was to deploy two executables, one for NT and one for 9X. Fortunately, this changed in 2001 when MS (finally!) released MSLU runtime that allows Unicode applications to run under Windows 9X.

See these pages for details:

- MSLU announcement
- MSLU runtime download
- MSDN article about MSLU
- known bugs in MSLU
- other subsystems with existing Unicode support

Less fortunately, this solution requires that you use a special statically linked import library that decides at runtime whether to load symbols from system libraries like `kernel32.dll` or `user32.dll` (in case of Windows NT) or from unicows.dll (which provides Unicode emulation layer under 9X). This import library is only available for Microsoft Visual C++ and is only part of the new Platform SDK, which is rather huge package.

libunicows contains independent implementation of the import library. It can be used with any C compiler (although it was only tested with Mingw32, MSVC and Borland compilers so far) and is released under the Open Source MIT license (this permits you to link the library into your executable without any restrictions).

For compilers where "native" import library is not available in precompiled form or is impossible/difficult to create (this is the case of e.g. Borland C++ which doesn't use COFF libraries), libunicows provides alternative mean of using unicows.dll (beginning with version 0.6). There is a version of unicows import library compiled as a DLL, called unicows_wrapper.dll. You can create import library for the wrapper as you do with any other DLL and calls to Unicode API functions will go through the wrapper DLL. Unlike when creating such import library for `unicows.dll`, `unicows.dll` is not used on NT/2000/XP systems when using the wrapper.

### Alternatives to MSLU

MSLU comes with licensing terms that are highly unfriendly to Open Source applications: although you can freely distribute unicows.dll with your application, your licensing terms must meet certain conditions that no Open Source license can. Namely, you must forbid further redistribution and the license must be an EULA accepted by the user either in writing or using click-through or shrink-wrap mechanism.

To overcome this obstancle, the Mozilla project began reimplementing similar solution under Open Source terms: Opencow: Open Layer for Unicode (see also discussion in bugzilla). Althought it's nowhere need MSLU's API coverage yet, it already implements some functions that MSLU doesn't.

Latest version of libunicows supports both `unicows.dll` and `opencow.dll`.

### Download

Mingw32 | libunicows-1.1.1-mingw32.zip
Microsoft Visual C++ 6 | libunicows-1.1.1-msvc6.zip
Borland C++ | libunicows-1.1.1-bcc32.zip
Watcom C/C++ | libunicows-1.1.1-watcom.zip
DigitalMars | libunicows-1.1.1-dmc.zip
LCC-Win32 | libunicows-1.1.1-lcc.zip
Source code | libunicows-1.1.1-src.tar.gz

See also the SF.net project page

### Changes

version 1.1.1

- MZLU was renamted to Opencow and the DLL is now opencow.dll
- the library now exists under two names: `libunicows.lib` and `unicows.lib`; this makes it possible to force use of libunicows even on systems that have MS version of `unicows.lib` installed

version 1.1.0

- added support for MZLU (Mozilla Layer for Unicode)
- fixed `_PfnLoadUnicows` to work in exactly same manner as in Microsoft version

version 1.0.0

- implemented GetProcAddress wrapping (Alexey A. Popoff)
- libunicows symbols loading is now thread-safe

version 0.7.0

- added 13 more symbols found in latest `unicows.dll`

version 0.6.5

- native DigitalMars import library (Masashi Ktamura)
- native LCC-Win32 import library (Thiadmer Riemersma)

version 0.6.4

- native (Open)Watcom C/C++ import library (Thiadmer Riemersma)

version 0.6.3

- fixed `winspool.drv` loading (Tom Bishop)
- native Borland C++ import library which doesn't use `unicows_wrapper.dll` (Seclan)

version 0.6.2:

- added more symbols (only GetProcAddress is missing, let me know if you can figure how to add it...)

version 0.6.1:

- unicows_wrapper.dll was made almost twice smaller
- 0.6 binaries had some wrong symbols, this is now fixed

version 0.6:

- added unicows_wrapper.dll, which is a helper that makes it possible to use libunicows with any compiler, independently of the way its import libraries work
- added import library for Borland C++ (uses unicows_wrapper.dll)

version 0.5:
initial release

### Contact

Important note: I wrote libunicows import library, not MSLU/unicows.dll itself. If you have problems with making MSLU work or if you have problems with some software using unicows.dll, don't write to me! I can't and won't do anything about it. On the other hand, feedback from developers about the import library from this site is most welcome and some are bug reports for bugs in the import library itself (e.g. when MSLU doesn't work because libunicows' dynamic loading code malfunctions).

You can contact me by e-mail at vslavik@fastmail.fm.

### Links to libunicows

Libunicows is listed at thefreecountry.com, MinGW homepage.