International Components for Unicode
ReadMe

Version: 2001-Aug-02
Copyright © 1995-2001 International Business Machines Corporation and others. All Rights Reserved.


Table of Contents


Introduction

Today's software market is a global one in which it is desirable to develop and maintain one application that supports a wide variety of national languages. International Components for Unicode provides the following tools to help you write language independent applications:

It is possible to support additional locales by adding more locale data files, with no code changes. Please refer to POSIX programmer's Guide for details on what the ISO locale ID means.

This document will go into more detail on how to build and install ICU on your machine. Once you start using ICU, the Where To Find More Information section of this document will be very helpful resource.

Your comments are important to making this release successful. We are committed to fixing any bugs, and will also use your feedback to help plan future releases.

IMPORTANT: Please make sure you understand the Copyright and License Information.

Late Breaking News And What Is New?

For more news about this release, see the online release notes.

Support for Unicode 3.1

The ICU 2.0 data has been upgraded to support Unicode 3.1. This means that the character property data and normalization has changed. Recent versions of ICU already supported Unicode 3.0 data with UTF-16 surrogate pairs.

License Change

The ICU projects (ICU4C and ICU4J) have changed their licenses from the IPL (IBM Public License) to the X license. The X license is a non-viral and recommended free software license that is compatible with the GNU GPL license. This is effective starting with release 1.8.1 of ICU4C and release 1.3.1 of ICU4J. All previous ICU releases will continue to utilize the IPL. New ICU releases will adopt the X license. The users of previous releases of ICU will need to accept the terms and conditions of the X license in order to adopt the new ICU releases.

The main effect of the change is to provide GPL compatibility. The X license is listed as GPL compatible, see the gnu page at http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses.

The text of the X license is available at http://www.x.org/terms.htm. The IBM version contains the essential text of the license, omitting the X-specific trademarks and copyright notices.

For more details please see the press announcement and the Project FAQ.

Collation Improvements

The collation framework has been reimplemented to make it faster, Unicode Collation Algorithm compliant, and to make the locale-specific collation data smaller (by separating it from the shared UCA data).
Sort keys and even some collation results have changed from ICU 1.6 and ICU 1.7.
For details, see our collation design document.

What the International Components for Unicode Contain

There are two ways to download the ICU releases,

For more details on how to download ICU directly from the web site, please also see http:/oss.software.ibm.com/icu/download/

Below, $Root is the placement of the icu directory in your file system, like "drive:\...\icu" in your environment. "drive:\..." stands for any drive and any directory on that drive that you chose to install icu into.

The following files describe the code drop.
readme.html Describes the International Components for Unicode (this file)
license.html Contains IBM's public license


The following directories contain source code and data files.
$Root/source/common/ The core Unicode and support functionality, such as resource bundles, character properties, locales, codepage conversion, normalization, Unicode properties, Locale, and UnicodeString.
$Root/source/i18n/ Modules in i18n are generally the more data-driven, that is to say resource bundle driven, components. These deal with higher level internationalization issues such as formatting, collation, text break analysis, and transliteration.
$Root/source/test/intltest/ A test suite including all C++ APIs. For information about running the test suite, see the users' guide.
$Root/source/test/cintltst/ A test suite written in C, including all C APIs. For information about running the test suite, see the users' guide.
$Root/data/ This directory contains the source data in text format, which is compiled into binary form during the ICU build process. The output from these files is stored in $Root/source/data/build while awaiting further packaging.
  • unidata/ This directory contains the Unicode data files. Please see http://www.unicode.org/ for more information.
  • Resource Bundle sources .txt files containing ICU language and culture-specific localization data. Two special bundles are root, which is the fallback data and parent of other bundles, and index which contains a list of installed bundles. resfiles.txt contains the list of resource bundle files.

    Also here are transliteration bundles, and the list of installed transliteration files in translit_index.txt.

    All resource bundles are compiled into .res files. The ucmfiles.txt file contains the list of converter files.

  • Code page converter tables .ucm files containing mappings to and from Unicode. These are compiled into .cnv files.
  • convrtrs.txt is the alias mapping table from various converter name formats to ICU internal format and vice versa. It produces cnvalias.dat.
  • timezone.txt is a generated file which is compiled into tz.dat, containing time zone information.
$Root/source/data This directory is where the final, packaged version of the ICU binary data ends up. If the ICU_DATA environment variable is used, then it should be set to this directory. The intermediate individual data files (.res, .cnv) are kept in the subdirectory "$Root/source/data/build" prior to packaging.
$Root/source/tools Tools for generating the data files. Data files are generated by invoking $Root/source/data/build/makedata.bat on Win32 or $Root/source/make on Unix.
$Root/source/samples Various sample programs that use ICU
$Root/source/extra Non-supported API additions. Currently, it contains the 'ustdio' file i/o library
$Root/source/layout Contains the ICU layout engine (not a rasterizer).
$Root/packaging
$Root/debian
These directories contain scripts and tools for packaging the final ICU build for various release platforms.
$Root/source/config Contains helper makefiles for platform specific build commands. Used by 'configure'.
$Root/source/allinone Contains top-level ICU project files, for instance to build all of ICU under one MSVC project.

Platform Dependencies

The platform dependencies have been mostly isolated into the following files in the common library. This information can be useful if you are porting ICU to a new platform.

It is possible to build each library individually. They must be built in the following order:

  1. stubdata
  2. common
  3. i18n
  4. toolutil
  5. makeconv
  6. genrb
  7. gentz
  8. genccode
  9. gennames
  10. genuca
  11. gennorm
  12. makedata (a project on Windows, or source/data/Makefile on Unix)
  13. ctestfw, intltest and cintltst, if you want to run the test suite.

How To Build And Install ICU

Supported Platforms

Here is a status of functionality of ICU on several different platforms.
Operating system Compiler Testing frequency
Windows 98/NT/2000 Microsoft Visual C++ 6.0 Reference platform
Red Hat Linux 6.1 gcc 2.91.66 Reference platform
AIX 4.3.3 xlC 3.6.4 Reference platform
Solaris 2.6 Workshop Pro CC 4.2 Reference platform
HP/UX 11.01 aCC A.12.10 Reference platform
HP/UX 10.20 CC A.03.10 Reference platform
Windows 95 Microsoft Visual C++ 6.0 Regularly tested
Solaris 2.6 gcc 2.91.66 Regularly tested
OS/390 (zSeries) CC Regularly tested
AS/400 (zSeries) V5R1 iCC Regularly tested
NetBSD, FreeBSD, OpenBSD   Rarely tested
SGI/IRIX   Rarely tested
PTX   Rarely tested
OS/2 Visual Age Rarely tested
Macintosh   Needs help to port


Key to testing frequency

Reference platform
ICU will work on these platforms with these compilers
Regularly tested
ICU should work on these platforms with these compilers
Rarely tested
ICU may not work on these platforms

How To Build And Install On Windows

Building International Components for Unicode requires:

The steps are:

  1. Unzip the icu-XXXX.zip file, type "unzip -a icu-XXXX.zip -d drive:\directory" under command prompt or use WinZip. drive:\directory\icu is the root ($Root) directory (you may but don't need to place "icu" into another directory). If you change the root, you will change the project settings accordingly in EACH makefile in the project, updating the "include" and "library" paths.
  2. Set the environment variable ICU_DATA to the full pathname of the data directory. The trailing "\" is required after the directory name (e.g. "$Root\source\data\" will work, but the value "$Root\source\data" is not acceptable). This environment variable indicates where the locale data files and conversion mapping tables are located.
  3. Be sure that the ICU binary directory, $Root\bin\, is included in the PATH environment variable. The tests may not work without the DLL files in the path.
  4. Set the TZ environment variable to PST8PDT. The tests will not work in any other timezone.
  5. Use Microsoft Visual C++ 6.0 to open the "$Root\source\allinone\allinone.dsw" workspace (This workspace includes all the International Components for Unicode libraries, necessary ICU building tools, and the intltest and cintltest test suite projects). Please see the note below if you want to build from the command line instead.
  6. Set the active Project to the "all" project. To do this: Choose "Project" menu, and select "Set active project". In the submenu, select the "all" workspace.
  7. Set the active configuration to "Win32 Debug" or "Win32 Release" (See note below).
  8. Choose the "Build" menu and select "Rebuild All". If you want to build the Debug and Release at the same time, see the note below.
  9. Run the C++ test suite, "intltest". To do this: set the active project to "intltest", and press F5 to run it.
  10. Run the C test suite, "cintltst". To do this: set the active project to "cintltst", and press F5 to run it.
  11. Make sure that both "cintltst" and "intltest" passed without any errors. The return codes are non-zero when they do not pass. Visual C++ will display the return codes in the debug tag of the output window. When "intltest" and "cintltest" return 0, it means that everything is installed correctly. You can press Ctrl+F5 on the test project to run the test and see what error messages were displayed (if any tests failed).
  12. Reset the TZ environment variable to its original value, unless you plan on testing ICU any further.
  13. You are now able to develop applications with ICU.

Using MSDEV At The Command Line Note: You can build ICU from the command line. Assuming that you have properly installed Microsoft Visual C++ to support command line execution, you can run the following command, 'msdev $Root\source\allinone\allinone.dsw /MAKE "ALL"'.

Setting Active Configuration Note: To set the active configuration, two different possibilities are:

Batch Configuration Note: If you want to build the Debug and Release configurations at the same time, choose "Build" menu and select "Batch Build..." instead (and mark all configurations as checked), then click the button named "Rebuild All". The "all" workspace will build all the test programs as well as the tools for generating binary locale data files. The "makedata" project will be run automatically to convert the locale data files from text format into icudata.dll.

How To Build And Install On Unix

Building International Components for Unicode on Unix requires:

A UNIX C++ compiler, (gcc, cc, xlc_r, etc...) installed on the target machine. A recent version of GNU make (3.7+). For a list of OS/390 tools please view the OS/390 build section of this document for further details.

The steps are:

  1. Decompress the icuXXXX.tar (or icuXXXX.tgz) file and use pax.
  2. Before running the test programs or samples, please set the environment variable ICU_DATA, the full pathname of the data directory, to indicate where the locale data files and conversion mapping tables are. If this variable is not set, the default user data directory will be used. The trailing "/" is required after the directory name (e.g. "$Root/source/data/" will work, but the value "$Root/source/data" is not acceptable). When you are running individual tests, the TZ environment variable needs to be set to PST8PDT. Normally "make check" does this for you automatically.
  3. Change directory to the "icu/source".
  4. If it is not already set, please set the executable flag for the following files (by executing 'chmod +x' command): runConfigureICU, configure, install-sh and config.*,
  5. Run the runConfigureICU script for your platform. If you are not using the runConfigureICU script or your platform is not supported by the script, you need to set your CC, CXX, CFLAGS and CXXFLAGS environment variables, and type "./configure". You can type "./configure --help" to print the available options.
  6. Type "gmake" to compile the libraries and all the data files.
    Note: On OS/390, both IEEE binary floating point and native S/390 hexadecimal floating point calculations are supported. The default is to build with native floating-point support. Please set the environment variable IEEE390=1 if you would like to make the ICU DLLs with IEEE floating point support.
  7. Optionally, type "gmake check" to verify the test suite.
  8. Type "gmake install" to install.

Some platforms use package management tools to control the installation and uninstallation of files on the system, as well as the integrity of the system configuration. You may want to check if ICU can be packaged for your package management tools by looking into the "packaging" directory. (Please note that if you are using a snapshot of ICU from CVS, it is probable that the packaging scripts or related files are not up to date with the contents of ICU at this time, so use them with caution.)

OS/390 (zSeries) Platform

If you are building on the OS/390 UNIX System Services platform, it is important that you understand a few details:

OS/390 Batch (PDS) support

By default, ICU builds its libraries into the HFS. However, there is a 390-specific switch to build some libraries into PDS files. The switch is the environmental variable OS390BATCH, and if set, the following libraries are built into PDS files: libicuucXX.dll, libicudtXXe.dll, libicudtXXe_390.dll, and libtestdata.dll. Turning on OS390BATCH does not turn off the normal HFS build, thus the HFS dlls will always be created.

The names of the PDS files are determined by the value of the environmental variables LOADMOD and LOADEXP. These variables must contain the target PDS names whenever the OS390BATCH variable is set. LOADMOD is the library (.dll) target dataset and LOADEXP is the side deck (.x) target dataset.

The PDS member names are as follows:

IXMICUUC --> libicuucXX.dll
IXMICUDA --> libicudtXXe.dll
IXMICUD1 --> libicudtXXe_390.dll
IXMICUTE --> libtestdata.dll

Example PDS attributes are as follows:

Data Set Name . . . : USER.ICU.LOAD
General Data
Management class. . : **None**
Storage class . . . : BASE
Volume serial . . . : TSO007
Device type . . . . : 3390
Data class. . . . . : LOAD
Organization  . . . : PO
Record format . . . : U
Record length . . . : 0
Block size  . . . . : 32760
1st extent cylinders: 40
Secondary cylinders : 59
Data set name type  : PDS

Data Set Name . . . : USER.ICU.EXP
General Data
Management class. . : **None**
Storage class . . . : BASE
Volume serial . . . : TSO007
Device type . . . . : 3390
Data class. . . . . : **None**
Organization  . . . : PO
Record format . . . : FB
Record length . . . : 80
Block size  . . . . : 3200
1st extent cylinders: 3
Secondary cylinders : 3
Data set name type  : PDS

OS/400 (iSeries) Platform

ICU Reference Release 1.8.1 contains partial support for the 400 platform, but additional work by the user is currently needed to get it to build properly. A future release of ICU should work out-of-the-box under OS/400.

Important Notes About Using ICU

Windows Platform

If you are building on the Win32 platform, it is important that you understand a few of the following build details.

DLL directories and the PATH setting

As delivered, the International Components for Unicode build as several DLLs. These DLLs are placed in the "icu\bin" directory. You must add this directory to the PATH environment variable in your system, or any executables you build will not be able to access International Components for Unicode libraries. Alternatively, you can copy the DLL files into a directory already in your PATH, but we do not recommend this. You can wind up with multiple copies of the DLL and wind up using the wrong one.

Changing your PATH

Linking with Runtime libraries

All the DLLs link with the C runtime library "Debug Multithreaded DLL" or "Multithreaded DLL." (This is changed through the Project Settings dialog, on the C/C++ tab, under Code Generation.) It is important that any executable or other DLL you build which uses the International Components for Unicode DLLs links with these runtime libraries as well. If you do not do this, you will get random memory errors when you run the executable.

Unix Type Platform

If you are building on a Unix platform, it is important that you add the location of your ICU libraries (including the data library) to your LD_LIBRARY_PATH environment variable. The ICU libraries may not link or load properly without doing this.

Getting More Information About ICU

Here are some useful links regarding ICU and internationalization in general.
http://oss.software.ibm.com/icu/ International Components for Unicode homepage
http://oss.software.ibm.com/icu/userguide/icufaq.html Frequently asked questions about ICU
http://oss.software.ibm.com/icu/download Download the latest version of ICU and documentation
http://oss.software.ibm.com/icu/apiref/ API Documentation in HTML form
http://oss.software.ibm.com/icu/userguide/ Draft User's Guide Documentation in HTML form
http://oss.software.ibm.com/icu/userguide/icu.pdf Draft User's Guide Documentation in PDF form
http://www.ibm.com/developer/unicode/ Information on how to make applications global.

Submitting Comments, Requesting Features and Reporting Bugs

To submit comments, request features and report bugs, please contact us. The best forum is the ICU mailing list. See the information on how to browse and join the list. If you find a bug in the code that has not been submitted and/or fixed yet, then please submit a jitterbug.


Copyright © 1997-2001 International Business Machines Corporation and others. All Rights Reserved.
IBM Center for Emerging Technologies Silicon Valley,
10275 N De Anza Blvd., Cupertino, CA 95014
All rights reserved.