import icu4c 3.8
diff --git a/as_is/os390/unpax-icu.sh b/as_is/os390/unpax-icu.sh
new file mode 100755
index 0000000..23a1ebc
--- /dev/null
+++ b/as_is/os390/unpax-icu.sh
@@ -0,0 +1,102 @@
+#!/bin/sh
+# Copyright (C) 2001-2007, International Business Machines
+#   Corporation and others.  All Rights Reserved.
+#
+# Authors:
+# Ami Fixler
+# Steven R. Loomis
+# George Rhoten
+#
+# Shell script to unpax ICU and convert the files to an EBCDIC codepage.
+# After extracting to EBCDIC, binary files are re-extracted without the
+# EBCDIC conversion, thus restoring them to original codepage.
+#
+# Set the following variable to the list of binary file suffixes (extensions)
+
+#binary_suffixes='ico ICO bmp BMP jpg JPG gif GIF brk BRK'
+#ICU specific binary files
+binary_suffixes='brk BRK bin BIN res RES cnv CNV dat DAT icu ICU spp SPP xml XML'
+
+usage()
+{
+    echo "Enter archive filename as a parameter: $0 icu-archive.tar"
+}
+# first make sure we at least one arg and it's a file we can read
+if [ $# -eq 0 ]; then
+    usage
+    exit
+fi
+tar_file=$1
+if [ ! -r $tar_file ]; then
+    echo "$tar_file does not exist or cannot be read."
+    usage
+    exit
+fi
+
+echo ""
+echo "Extracting from $tar_file ..."
+echo ""
+# extract files while converting them to EBCDIC
+pax -rvf $tar_file -o to=IBM-1047,from=ISO8859-1 -o setfiletag
+
+echo ""
+echo "Determining binary files ..."
+echo ""
+
+# When building in ASCII mode, text files are converted as ASCII
+if [ "${ICU_ENABLE_ASCII_STRINGS}" -eq 1 ]; then
+    binary_suffixes="$binary_suffixes txt TXT ucm UCM"
+else
+	for file in `find ./icu \( -name \*.txt -print \) | sed -e 's/^\.\///'`; do
+		bom8=`head -c 3 $file|\
+			od -t x1|\
+			head -n 1|\
+			sed 's/  */ /g'|\
+			cut -f2-4 -d ' '|\
+			tr 'A-Z' 'a-z'`;
+		#Find a converted UTF-8 BOM
+		if [ "$bom8" = "57 8b ab" ]
+		then
+			binary_files="$binary_files $file";
+		fi
+	done
+fi
+
+for i in $(pax -f $tar_file 2>/dev/null)
+do
+	case $i in
+	*/) ;;		# then this entry is a directory
+	*.*)		# then this entry has a dot in the filename
+		for j in $binary_suffixes
+		do
+			# We substitute the suffix more than once
+			# to handle files like NormalizationTest-3.2.0.txt
+			suf=${i#*.*}
+			suf=${suf#*.*}
+			suf=${suf#*.*}
+			if [ "$suf" = "$j" ]
+			then
+				binary_files="$binary_files $i"
+				break
+			fi
+		done
+		;;
+	*) ;;		# then this entry does not have a dot in it
+    esac
+done
+
+# now see if a re-extract of binary files is necessary
+if [ ${#binary_files} -eq 0 ]; then
+    echo ""
+    echo "There are no binary files to restore."
+else
+    echo "Restoring binary files ..."
+    echo ""
+    rm $binary_files
+    pax -rvf $tar_file $binary_files
+    # Tag the files as binary for proper interaction with the _BPXK_AUTOCVT
+    # environment setting
+    chtag -b $binary_files
+fi
+echo ""
+echo "$0 has completed extracting ICU from $tar_file."
diff --git a/as_is/os400/convertConfigure.sed b/as_is/os400/convertConfigure.sed
new file mode 100644
index 0000000..d125ea0
--- /dev/null
+++ b/as_is/os400/convertConfigure.sed
@@ -0,0 +1,20 @@
+# Copyright (C) 2006-2006, International Business Machines Corporation
+# and others.  All Rights Reserved.
+#
+# Use "test -x" instead of "test -f" most of the time.
+# due to how executables are created in a different file system.
+s/as_executable_p="test -f"/as_executable_p="test -x"/g
+s/test -f "$ac_file"/test -x "$ac_file"/g
+s/test -f $ac_dir\/install-sh/test -x $ac_dir\/install-sh/g
+s/test -f $ac_dir\/install.sh/test -x $ac_dir\/install.sh/g
+s/test -f $ac_dir\/shtool/test -x $ac_dir\/shtool/g
+# Use the more efficient del instead of rm command.
+s/rm[ ]*-rf/del -f/g
+s/rm[ ]*-fr/del -f/g
+s/rm[ ]*-f/del -f/g
+# Borne shell isn't always available on i5/OS
+s/\/bin\/sh/\/usr\/bin\/qsh/g
+# Use -c qpponly instead of -E to enable the preprocessor on the compiler
+s/\$CC -E/\$CC -c -qpponly/g
+# no diff in qsh the equivalent is cmp
+s/ diff / cmp -s /g
\ No newline at end of file
diff --git a/as_is/os400/unpax-icu.sh b/as_is/os400/unpax-icu.sh
new file mode 100755
index 0000000..cd6dc1b
--- /dev/null
+++ b/as_is/os400/unpax-icu.sh
@@ -0,0 +1,179 @@
+#!/usr/bin/qsh
+#   Copyright (C) 2000-2007, International Business Machines
+#   Corporation and others.  All Rights Reserved.
+#
+# Authors:
+# Ami Fixler
+# Barry Novinger
+# Steven R. Loomis
+# George Rhoten
+# Jason Spieth
+#
+# Shell script to unpax ICU and convert the files to an EBCDIC codepage.
+# After extracting to EBCDIC, binary files are re-extracted without the
+# EBCDIC conversion, thus restoring them to original codepage.
+#
+# Set the following variable to the list of binary file suffixes (extensions)
+
+#****************************************************************************
+#binary_suffixes='ico ICO bmp BMP jpg JPG gif GIF brk BRK'
+#ICU specific binary files
+#****************************************************************************
+binary_suffixes='brk BRK bin BIN res RES cnv CNV dat DAT icu ICU spp SPP xml XML'
+data_files='icu/source/data/brkitr/* icu/source/data/locales/* icu/source/data/coll/* icu/source/data/rbnf/* icu/source/data/mappings/* icu/source/data/misc/* icu/source/data/translit/* icu/source/data/unidata/* icu/source/test/testdata/*'
+
+#****************************************************************************
+# Function:     usage
+# Description:  Prints out text that describes how to call this script
+# Input:        None
+# Output:       None
+#****************************************************************************
+usage()
+{
+  echo "Enter archive filename as a parameter: $0 icu-archive.tar"
+}
+
+#****************************************************************************
+# first make sure we at least one arg and it's a file we can read
+#****************************************************************************
+
+# check for no arguments
+if [ $# -eq 0 ]; then
+  usage
+  exit
+fi
+
+# tar file is argument 1
+tar_file=$1
+
+# check that the file is valid
+if [ ! -r $tar_file ]; then
+  echo "$tar_file does not exist or cannot be read."
+  usage
+  exit
+fi
+
+#****************************************************************************
+# Determine which directories in the data_files list
+# are included in the provided archive
+#****************************************************************************
+for data_dir in $data_files
+do
+   if (pax -f $tar_file $data_dir >/dev/null 2>&1)
+   then
+       ebcdic_data="$ebcdic_data `echo $data_dir`";
+   fi
+done
+
+#****************************************************************************
+# Extract files.  We do this in two passes.  One pass for 819 files and a
+# second pass for 37 files
+#****************************************************************************
+echo ""
+echo "Extracting from $tar_file ..."
+echo ""
+
+# extract everything as iso-8859-1 except these directories
+pax -C 819 -rcvf $tar_file $ebcdic_data
+
+# extract files while converting them to EBCDIC
+echo ""
+echo "Extracting files which must be in ibm-37 ..."
+echo ""
+pax -C 37 -rvf $tar_file $ebcdic_data
+
+#****************************************************************************
+# For files we have restored as CCSID 37, check the BOM to see if they    
+# should be processed as 819.  Also handle files with special paths. Files
+# that match will be added to binary files lists.  The lists will in turn
+# be processed to restore files as 819.
+#****************************************************************************
+echo ""
+echo "Determining binary files ..."
+echo ""
+
+# Process BOMs
+for file in `find ./icu \( -name \*.txt -print \)`; do
+    bom8=`head -n 1 $file|\
+          od -t x1|\
+          head -n 1|\
+          sed 's/  */ /g'|\
+          cut -f2-4 -d ' '|\
+          tr 'A-Z' 'a-z'`;
+    #Find a converted UTF-8 BOM
+    if [ "$bom8" = "057 08b 0ab" -o "$bom8" = "57 8b ab" ]
+    then
+        file="`echo $file | cut -d / -f2-`"
+
+        if [ `echo $binary_files | wc -w` -lt 200 ]
+        then
+            binary_files="$binary_files $file";
+        else
+            echo "Restoring binary files ..."
+            rm $binary_files;
+            pax -C 819 -rvf $tar_file $binary_files;
+            echo "Determining binary files ..."
+            binary_files="$file";
+        fi
+    fi
+done
+
+# Process special paths
+for i in $(pax -f $tar_file 2>/dev/null)
+do
+  case $i in
+    */)
+#    then this entry is a directory
+     ;;
+    *.*)
+#    then this entry has a dot in the filename
+     for j in $binary_suffixes
+     do
+       suf=${i#*.*}
+       if [ "$suf" = "$j" ]
+       then
+
+         if [ `echo $binary_files | wc -w` -lt 200 ]
+         then
+            binary_files="$binary_files $i";
+         else
+            echo "Restoring binary files ..."
+            rm $binary_files;
+            pax -C 819 -rvf $tar_file $binary_files;
+            echo "Determining binary files ..."
+            binary_files="$i";
+         fi
+         break
+       fi
+     done
+     ;;
+    *)
+#    then this entry does not have a dot in it
+     ;;
+  esac
+done
+
+# now see if a re-extract of binary files is necessary
+if [ `echo $binary_files | wc -w` -gt 0 ]
+then
+  echo "Restoring binary files ..."
+  rm $binary_files
+  pax -C 819 -rvf $tar_file $binary_files
+fi
+
+#****************************************************************************
+# Generate and run the configure script
+#****************************************************************************
+
+echo ""
+echo "Generating qsh compatible configure ..."
+echo ""
+
+sed -f icu/as_is/os400/convertConfigure.sed icu/source/configure > icu/source/configureTemp
+del -f icu/source/configure
+mv icu/source/configureTemp icu/source/configure
+chmod 755 icu/source/configure
+
+echo ""
+echo "$0 has completed extracting ICU from $tar_file."
+
diff --git a/debian/.cvsignore b/debian/.cvsignore
new file mode 100644
index 0000000..2fe3e9b
--- /dev/null
+++ b/debian/.cvsignore
@@ -0,0 +1,17 @@
+*.debhelper
+docs
+*files
+*.substvars
+libicu-dev
+*libicu[0-9]*
+icu
+icu-locales
+icu-data
+icu-i18ndata
+tmp
+control
+postinst
+prerm
+icu.postinst
+icu.prerm
+icu-doc
diff --git a/debian/README.Debian.libicu-dev b/debian/README.Debian.libicu-dev
new file mode 100644
index 0000000..af99c2a
--- /dev/null
+++ b/debian/README.Debian.libicu-dev
@@ -0,0 +1,11 @@
+Copyright (C) 2000-2006, International Business Machines
+Corporation and others.  All Rights Reserved.
+
+libicu-dev for Debian
+---------------------
+
+The documentation in /usr/share/doc/libicu-dev/docs/ provides a high-level
+overview of ICU. Detailed API documentation is provided by the icu-docs
+package.
+
+ -- Yves Arrouye <yves@debian.org>, Wed, 11 Oct 2000 19:37:57 -0700
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..f2f87f2
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,240 @@
+icu (3.6-1) unstable; urgency=low
+
+  * New upstream release
+  * Provide libicu34-dev since ICU 3.6 provides backward compatible
+    interfaces in addition to new ones.
+
+ -- Jay Berkenbilt <qjb@debian.org>  Tue, 19 Sep 2006 12:10:41 -0400
+
+icu (3.6~d02-1) experimental; urgency=low
+
+  * New upstream release.
+  * Remove special optimization hack to work around now-fixed m68k build
+    problems.  (Closes: #360743)
+  * Update standards version.  No changes required.
+
+ -- Jay Berkenbilt <qjb@debian.org>  Tue, 15 Aug 2006 16:34:34 -0400
+
+icu (3.4.1a-1) unstable; urgency=low
+
+  * Upstream re-released 3.4.1 without changing the version number because
+    the header file with 3.4.1 still said it was 3.4.  Unfortunately, the
+    debian 3.4.1 package had already been uploaded.  This "3.4.1a" release
+    now matches upstream's 3.4.1.
+
+ -- Jay Berkenbilt <qjb@debian.org>  Wed, 29 Mar 2006 22:19:08 -0500
+
+icu (3.4.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Jay Berkenbilt <qjb@debian.org>  Fri,  3 Mar 2006 23:07:52 -0500
+
+icu (3.4-4) unstable; urgency=low
+
+  * Build with g++ 4.0 with -fno-strict-aliasing to work around g++ 4.0
+    bugs that impact ICU.  Future versions should work properly with the
+    latest g++ without any special flags.  (Closes: #342970)
+  * Enable static libraries.
+
+ -- Jay Berkenbilt <qjb@debian.org>  Sun, 22 Jan 2006 11:36:59 -0500
+
+icu (3.4-3) unstable; urgency=low
+
+  * Explicitly build with g++ 3.4.  The current ICU fails its test suite
+    with 4.0 but not with 3.4.  Future versions should work properly with
+    4.0.
+
+ -- Jay Berkenbilt <qjb@debian.org>  Sat, 19 Nov 2005 11:29:31 -0500
+
+icu (3.4-2) unstable; urgency=low
+
+  * Remove some extraneous build steps that may cause problems with
+    autobuilders.
+
+ -- Jay Berkenbilt <qjb@debian.org>  Sat, 13 Aug 2005 12:41:35 -0400
+
+icu (3.4-1) unstable; urgency=low
+
+  * New upstream release
+  * Completely new packaging
+
+ -- Jay Berkenbilt <qjb@debian.org>  Fri,  5 Aug 2005 21:57:15 -0400
+
+icu (2.1-3) unstable; urgency=low
+
+  * New maintainer as per discussion with Ivo.
+  * g++ 4.0 transition: libicu21c102 is now libicu21c2.
+  * Accepted changes from NMU below for now.  This change will be
+    reversed soon when icu is updated to the current upstream version.
+    The icu28 package will also be removed at that time, as per discussion
+    with the icu28 maintainer.  Closes: #301316
+  * Add shlibs files
+
+ -- Jay Berkenbilt <qjb@debian.org>  Sat,  9 Jul 2005 13:33:35 -0400
+
+icu (2.1-2.1) unstable; urgency=medium
+
+  * Rename icu-doc to icu21-doc. icu-doc is built by the icu28 package.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 21 May 2005 22:44:31 +0200
+
+icu (2.1-2) unstable; urgency=low
+
+  * debian/control: Changed maintainer, added Daniel Glassey as Uploader.
+    (Reference:
+    http://lists.debian.org/debian-devel/2003/debian-devel-200308/msg01963.html)
+
+ -- Ivo Timmermans <ivo@debian.org>  Sun, 18 Jan 2004 23:52:03 +0100
+
+icu (2.6.1-1) experimental; urgency=low
+
+  * New upstream version.
+  * Ivo Timmermans:
+      * debian/rules Don't create arch-all packages in the binary-arch
+        target.  Closes: #184403
+
+ -- Ivo Timmermans <ivo@debian.org>  Thu,  6 Nov 2003 09:03:44 +0100
+
+icu (2.6-1) experimental; urgency=low
+
+  * New upstream version. Closes: #162975
+  * debian/control: New maintainers
+  * Daniel Glassey:
+      * debian/rules Don't use --enable-static as it bloats the packages
+      * debian/rules Change the optimisations to -O3 and -O to get it to build
+      * debian/rules get the latest config.{sub,guess} from /usr/share/misc
+        so add build-dep on autotools-dev
+      * debian/postinst gencnval is now in {prefix}/bin
+  * Ivo Timmermans:
+      * debian/control Tightened debhelper build dependency
+      * debian/control Update Standards-Version
+
+ -- Daniel Glassey <wdg@debian.org>  Wed,  3 Sep 2003 12:39:35 +0200
+
+icu (2.1-1.2) unstable; urgency=low
+
+  * NMU.
+  * Updated source/config.{sub,guess}.  Closes: #182697
+
+ -- Ivo Timmermans <ivo@debian.org>  Fri,  7 Mar 2003 20:58:23 +0100
+
+icu (2.1-1.1) unstable; urgency=low
+
+  * NMU.
+  * debian/control: Go through G++ ABI transition. Closes: #180124
+  * source/common/unicode/docmain.h: Fix \mainpage and \section tags,
+    so doxygen doesn't get confused any more. Closes: #178344
+  * debian/copyright: Added upstream URL. Closes: #165780
+
+ -- Ivo Timmermans <ivo@debian.org>  Fri, 14 Feb 2003 15:21:56 +0100
+
+icu (2.1-1) unstable; urgency=low
+
+  * ICU 2.1 release.
+  * Changed the icu package description. Closes: 142886
+  * Use -O1 for CXXFLAGS for OS/390. Closes: 143021
+
+ -- Yves Arrouye <yves@debian.org>  Mon, 15 Apr 2002 14:03:12 -0700
+
+icu (2.0.2-1) unstable; urgency=low
+
+  * Minor release of ICU with fixes for threading and strTo/FromWCS
+
+ -- Yves Arrouye <yves@debian.org>  Tue,  2 Apr 2002 09:06:00 -0800
+
+icu (2.0-2.1pre20020318-1) unstable; urgency=low
+
+  * Use the library number in the development package too.
+  * ICU changed to version 2.1.
+
+ -- Yves Arrouye <yves@debian.org>  Tue, 19 Mar 2002 18:38:37 -0800
+
+icu (2.0-2.1pre20020303-1) unstable; urgency=low
+
+  * Fixed a crash in uconv when no argument is passed to -f or -t.
+  * Other upstream changes.
+  * Fresh upload with an up to date orig tar file so that future
+    diffs won't be 6 megabytes long!
+
+ -- Yves Arrouye <yves@debian.org>  Sun,  3 Mar 2002 15:31:13 -0800
+
+icu (2.0-2.1pre-1) unstable; urgency=low
+
+  * Prerelease of 2.1 with a working upgraded uconv(1).
+
+ -- Yves Arrouye <yves@debian.org>  Fri,  1 Mar 2002 21:51:47 -0800
+
+icu (2.0-3) unstable; urgency=low
+
+  * Renamed doc-base to icu-doc.doc-base. Closes: 127487
+
+ -- Yves Arrouye <yves@debian.org>  Fri, 18 Jan 2002 22:33:53 -0800
+
+icu (2.0-2) unstable; urgency=low
+
+  * Fixed a bug in uprv_uca_cloneTempTable().  Closes: 128484
+  * Update Debian bugs status.  Closes: 104642
+  * Use the official 2.0 tarball as the original tar.
+  * Added manual pages for every tool.
+
+ -- Yves Arrouye <yves@debian.org>  Wed, 16 Jan 2002 20:45:42 -0800
+
+icu (2.0-1) unstable; urgency=low
+
+  * Update to ICU version 2.0.
+
+ -- Yves Arrouye <yves@debian.org>  Sat, 10 Nov 2001 21:58:19 -0800
+
+icu (1.8.1-2) unstable; urgency=low
+
+  * Updated copyright file. Closes: 112488
+  * Updated icu-locales description. Closes: 75499
+
+ -- Yves Arrouye <yves@debian.org>  Sat, 10 Nov 2001 21:24:58 -0800
+
+icu (1.8.1-1.1) unstable; urgency=low
+
+  * NMU to resolve build failures on ia64 and (hopefully) hppa.
+  * config.{sub|guess} update
+  * source/tools/ctestfw/ctest.c: Add static declaration to global
+    variables local to that module to avoid @gprel relocation errors.
+    Closes: 104642
+
+ -- Yves Arrouye <yves@debian.org>  Sat, 10 Nov 2001 21:24:44 -0800
+
+icu (1.8.1-1) unstable; urgency=low
+
+  * Update to ICU version 1.8.1.
+
+ -- root <yves@debian.org>  Mon, 21 May 2001 15:27:36 -0700
+
+icu (1.7-1) unstable; urgency=low
+
+  * Update to ICU version 1.7.
+
+ -- Yves Arrouye <yves@debian.org>  Tue, 21 Nov 2000 22:54:52 -0800
+
+icu (1.6.0.1-20001113-2) unstable; urgency=low
+
+  * New snapshot with better ISO-2022.
+
+ -- Yves Arrouye <yves@debian.org>  Mon, 13 Nov 2000 21:05:00 -0800
+
+icu (1.6.0.1-20001027-1) unstable; urgency=low
+
+  * Move architecture-dependent files into /usr/lib, instead of
+    /usr/share.
+  * Move convrtrs.txt into /etc/icu, make it a conffile, and generate
+    /usr/lib/icu/1.6.0.1/cnvalias.dat from it at postinst time.
+  * Manage a /usr/lib/icu/current symbolic link across installations
+    of the libicuXX packages. The symlink will always point to the
+    highest numbered version of ICU.
+
+ -- Yves Arrouye <yves@debian.org>  Fri, 27 Oct 2000 15:40:12 -0700
+
+icu (1.6.0.1-20001017-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Yves Arrouye <yves@debian.org>  Tue, 24 Oct 2000 16:14:12 -0700
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..858ba13
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,39 @@
+Source: icu
+Section: libs
+Priority: optional
+Maintainer: Jay Berkenbilt <qjb@debian.org>
+Standards-Version: 3.7.2
+Build-Depends: cdbs, debhelper (>= 4.1.0), doxygen
+
+Package: libicu36
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Replaces: icu, icu-locales
+Conflicts: icu, icu-locales
+Description: International Components for Unicode (libraries)
+ ICU is a C++ and C library that provides robust and full-featured
+ Unicode and locale support.  This package contains the runtime
+ libraries for ICU.
+
+Package: libicu36-dev
+Section: libdevel
+Architecture: any
+Depends: libicu36 (= ${Source-Version}), libc6-dev | libc-dev
+Provides: libicu-dev, libicu34-dev
+Replaces: libicu21-dev, libicu28-dev, icu-data, icu-i18ndata, libicu34-dev
+Conflicts: libicu21-dev, libicu28-dev, libicu-dev, icu-data, icu-i18ndata, libicu34-dev
+Suggests: icu-doc
+Description: International Components for Unicode (development files)
+ ICU is a C++ and C library that provides robust and full-featured
+ Unicode and locale support.  This package contains the development
+ files for ICU along with programs used to manipulate data files found
+ in the ICU sources.
+
+Package: icu-doc
+Section: doc
+Architecture: all
+Description: API documentation for ICU classes and functions
+ ICU is a C++ and C library that provides robust and full-featured
+ Unicode and locale support.  This package contains HTML files
+ documenting the ICU APIs.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..eddd3b4
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,35 @@
+ICU License - ICU 1.8.1 and later
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2001 International Business Machines Corporation and others
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, and/or sell copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies of
+the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder
+shall not be used in advertising or otherwise to promote the sale, use
+or other dealings in this Software without prior written authorization
+of the copyright holder.
+
+--------------------------------------------------------------------------------
+All trademarks and registered trademarks mentioned herein are the property of their respective owners.
+
diff --git a/debian/icu-doc.doc-base b/debian/icu-doc.doc-base
new file mode 100644
index 0000000..9810e67
--- /dev/null
+++ b/debian/icu-doc.doc-base
@@ -0,0 +1,13 @@
+Document: icu-doc
+Title: ICU API Documentation
+Author: IBM Corporation and Others
+Abstract: This manual describes the APIs of the
+  International Components for Unicode C/C++
+  library. It is a useful reference for the
+  ICU programmer.
+Section: Libs
+
+Format: HTML
+Index: /usr/share/doc/icu-doc/html/index.html
+Files: /usr/share/doc/icu-doc/html/*.html
+
diff --git a/debian/icu-doc.install b/debian/icu-doc.install
new file mode 100644
index 0000000..060a263
--- /dev/null
+++ b/debian/icu-doc.install
@@ -0,0 +1 @@
+debian/tmp/usr/share/doc/icu/html	usr/share/doc/icu-doc
diff --git a/debian/icu.conffiles.in b/debian/icu.conffiles.in
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/debian/icu.conffiles.in
diff --git a/debian/icu.postinst.in b/debian/icu.postinst.in
new file mode 100644
index 0000000..fedd331
--- /dev/null
+++ b/debian/icu.postinst.in
@@ -0,0 +1,71 @@
+#! /bin/sh
+# Copyright (c) 2000-2004 International Business Machines
+# Corporation and others. All Rights Reserved.
+# postinst script for foo
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+	# Adjust the current ICU link in @libdir@/@PACKAGE@
+
+	prefix=@prefix@
+	exec_prefix=@exec_prefix@
+
+	if [ -d @libdir@/@PACKAGE@ ]
+	then
+	    icucurrent=`2>/dev/null ls -dp @libdir@/@PACKAGE@/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+	    cd @libdir@/@PACKAGE@
+	    rm -f current
+	    if test x"$icucurrent" != x
+	    then
+	        ln -s "$icucurrent" current
+	    fi
+
+	    # Set ICU_DATA for ease of testing files. It is not necessary to
+	    # export it as we are guaranteed that the binaries we invoke will
+	    # use the right directory. But we're not taking chances with the
+	    # future :)
+
+	    ICU_DATA=@libdir@/@PACKAGE@/@VERSION@
+	    export ICU_DATA
+
+	fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
diff --git a/debian/icu.prerm.in b/debian/icu.prerm.in
new file mode 100644
index 0000000..28d8c01
--- /dev/null
+++ b/debian/icu.prerm.in
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (c) 2000-2003 International Business Machines
+# Corporation and others. All Rights Reserved.
+# prerm script for foo
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+    remove|upgrade|deconfigure)
+	# Adjust the current ICU link in @libdir@/@PACKAGE@
+
+	prefix=@prefix@
+	exec_prefix=@exec_prefix@
+
+	if [ -d @libdir@/@PACKAGE@ ]
+	then
+	    icucurrent=`2>/dev/null ls -dp @libdir@/@PACKAGE@/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+	    cd @libdir@/@PACKAGE@
+	    rm -f current
+	    if test x"$icucurrent" != x
+	    then
+	        ln -s "$icucurrent" current
+	    fi
+	fi
+
+#       install-info --quiet --remove /usr/info/foo.info.gz
+        ;;
+
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/libicu.postinst b/debian/libicu.postinst
new file mode 100644
index 0000000..a262d90
--- /dev/null
+++ b/debian/libicu.postinst
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (c) 2000-2003 International Business Machines
+# Corporation and others. All Rights Reserved.
+# postinst script for foo
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+# Call ldconfig in a way that makes lintian happy.
+
+if [ "$1" = "configure" ]; then ldconfig; fi
+
+# And now do the rest of the configuration
+
+case "$1" in
+    configure)
+
+	# Adjust the current ICU link in /usr/lib/icu
+
+	if [ -d /usr/lib/icu ]
+	then
+
+	icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+	cd /usr/lib/icu
+	rm -f current
+	if test x"$icucurrent" != x
+	then
+	    ln -s "$icucurrent" current
+	    ln -sf current/Makefile.inc .
+	fi
+
+	fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/libicu.prerm.in b/debian/libicu.prerm.in
new file mode 100644
index 0000000..a06ac25
--- /dev/null
+++ b/debian/libicu.prerm.in
@@ -0,0 +1,55 @@
+#! /bin/sh
+# Copyright (c) 2000-2003 International Business Machines
+# Corporation and others. All Rights Reserved.
+# prerm script for foo
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+    remove|upgrade|deconfigure)
+	# Adjust the current ICU link in @libdir@/@PACKAGE@
+
+	prefix=@prefix@
+	exec_prefix=@exec_prefix@
+
+	if [ -d @libdir@/@PACKAGE@ ]
+	then
+	    icucurrent=`2>/dev/null ls -dp @libdir@/@PACKAGE@/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+	    cd @libdir@/@PACKAGE@
+	    rm -f current
+	    if test x"$icucurrent" != x
+	    then
+	        ln -s "$icucurrent" current
+	    fi
+	fi
+
+#       install-info --quiet --remove /usr/info/foo.info.gz
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/postinst.in b/debian/postinst.in
new file mode 100644
index 0000000..1e7a3f7
--- /dev/null
+++ b/debian/postinst.in
@@ -0,0 +1,63 @@
+#! /bin/sh
+# Copyright (c) 2000-2003 International Business Machines
+# Corporation and others. All Rights Reserved.
+# postinst script for foo
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+	# Adjust the current ICU link in @libdir@/@PACKAGE@
+
+	prefix=@prefix@
+	exec_prefix=@exec_prefix@
+
+	if [ -d @libdir@/@PACKAGE@ ]
+	then
+	    icucurrent=`2>/dev/null ls -dp @libdir@/@PACKAGE@/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+	    cd @libdir@/@PACKAGE@
+	    rm -f current
+	    if test x"$icucurrent" != x
+	    then
+	        ln -s "$icucurrent" current
+	    fi
+	fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/prerm.in b/debian/prerm.in
new file mode 100644
index 0000000..a06ac25
--- /dev/null
+++ b/debian/prerm.in
@@ -0,0 +1,55 @@
+#! /bin/sh
+# Copyright (c) 2000-2003 International Business Machines
+# Corporation and others. All Rights Reserved.
+# prerm script for foo
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+    remove|upgrade|deconfigure)
+	# Adjust the current ICU link in @libdir@/@PACKAGE@
+
+	prefix=@prefix@
+	exec_prefix=@exec_prefix@
+
+	if [ -d @libdir@/@PACKAGE@ ]
+	then
+	    icucurrent=`2>/dev/null ls -dp @libdir@/@PACKAGE@/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+	    cd @libdir@/@PACKAGE@
+	    rm -f current
+	    if test x"$icucurrent" != x
+	    then
+	        ln -s "$icucurrent" current
+	    fi
+	fi
+
+#       install-info --quiet --remove /usr/info/foo.info.gz
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..ab96270
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,51 @@
+#!/usr/bin/make -f
+#
+# Copyright (c) 2000-2006 International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+# To distinguish variables that are truly local to this file (rather
+# than for use by cdbs), we adopt the convention of starting local
+# variables' names with l_.
+
+l_PWD := $(shell pwd)
+l_STAMPS := debian/l_stamps
+l_RUN_CHECK := 1
+
+# Variables used by cdbs
+
+VERSION := $(shell dpkg-parsechangelog | \
+             awk '/Version:/ {print $$2}' | cut -d- -f 1)
+
+DEB_TAR_SRCDIR = icu/source
+DEB_CONFIGURE_USER_FLAGS = --disable-samples --enable-static
+DEB_COMPRESS_EXCLUDE = html examples
+DEB_INSTALL_EXAMPLES_libicu36-dev = \
+	build-tree/$(DEB_TAR_SRCDIR)/samples/*
+# Include cdbs rules files.
+include /usr/share/cdbs/1/rules/tarball.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+
+DEB_MAKE_INSTALL_TARGET += install-doc
+
+cleanbuilddir::
+	$(RM) -r $(l_STAMPS)
+
+# As 0.4.21, cdbs creates but doesn't remove debian/compat.  It
+# creates it conditionally, so this doesn't have a trivial fix.
+clean::
+	$(RM) debian/compat *.cdbs-config_list
+
+# As per upstream, icuswap is deprecated and should not be
+# distributed.
+binary-post-install/libicu36-dev::
+	find debian/$(cdbs_curpkg) -type f -name .cvsignore | xargs rm
+	rm debian/$(cdbs_curpkg)/usr/sbin/icuswap
+
+# Install lintian override files
+binary-post-install/%::
+	if [ -f debian/$*.lintian ]; then \
+	    mkdir -p debian/$*/usr/share/lintian/overrides && \
+	    cp -p debian/$*.lintian debian/$*/usr/share/lintian/overrides/$*; \
+	fi
diff --git a/debian/watch.not-yet b/debian/watch.not-yet
new file mode 100644
index 0000000..d48b1b8
--- /dev/null
+++ b/debian/watch.not-yet
@@ -0,0 +1,10 @@
+#
+# Copyright (c) 2006 International Business Machines
+# Corporation and others. All Rights Reserved.
+#
+# This doesn't always work because ICU upstream doesn't always have
+# the latest version in the latest directory.  See debian bug 375138
+# for details.
+
+version=3
+ftp://ftp.software.ibm.com/software/globalization/icu/(?:\d+\.[\d\.]+)/icu-([\d\.]+).tgz
diff --git a/license.html b/license.html
new file mode 100644
index 0000000..b905ddf
--- /dev/null
+++ b/license.html
@@ -0,0 +1,51 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></meta>
+<title>ICU License - ICU 1.8.1 and later</title>
+</head>
+
+<body BGCOLOR="#ffffff">
+<h2>ICU License - ICU 1.8.1 and later</h2>
+
+<p>COPYRIGHT AND PERMISSION NOTICE</p>
+
+<p>
+Copyright (c) 1995-2006 International Business Machines Corporation and others
+</p>
+<p>
+All rights reserved.
+</p>
+<p>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, and/or sell
+copies of the Software, and to permit persons
+to whom the Software is furnished to do so, provided that the above
+copyright notice(s) and this permission notice appear in all copies
+of the Software and that both the above copyright notice(s) and this
+permission notice appear in supporting documentation.
+</p>
+<p>
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL
+THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM,
+OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
+RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
+USE OR PERFORMANCE OF THIS SOFTWARE.
+</p>
+<p>
+Except as contained in this notice, the name of a copyright holder shall not be
+used in advertising or otherwise to promote the sale, use or other dealings in
+this Software without prior written authorization of the copyright holder.
+</p>
+
+<hr>
+<p><small>
+All trademarks and registered trademarks mentioned herein are the property of their respective owners.
+</small></p>
+</body>
+</html>
diff --git a/packaging/PACKAGES b/packaging/PACKAGES
new file mode 100644
index 0000000..12b3523
--- /dev/null
+++ b/packaging/PACKAGES
@@ -0,0 +1,159 @@
+Copyright (C) 2000-2003, International Business Machines
+Corporation and others.  All Rights Reserved.
+ICU is packaged into a number of small, interdependent packages. This
+file describes what these packages are, what their name should be
+like, and what their contents are. It is useful as a reference and a
+guide when packaging ICU on a new system.
+
++ List of ICU packages.
+
+ICU is distributed as the following packages:
+
+- ICU libraries. This package contains the runtime libraries needed by
+applications that use ICU. All the other packages require this package
+to be installed.
+- ICU. This package contains the converters data, the timezones data,
+and all the ICU tools.
+- ICU locales. This package adds locales and break data.
+- ICU development. This package contains the files necessary to build
+applications that use ICU, i.e. header files, links to shared
+libraries used by the linker, static libraries, etc... It also
+contains sample applications and documentation.
+- ICU docs. This package contains further documentation for ICU,
+including a complete API reference.
+- ICU data. This package contains the source for the compiled data
+contained by the ICU package.
+- ICU international data. This package contains the source for the
+compiled data contained by the ICU locales package.
+
+In this file, we will refer to Autoconf variables as in $(bindir). In
+addition to these, we will use the following variables to denote
+ICU-specific directories or information:
+
+  VERSION       ICU's dotted version number, e.g. 1.6.0.1 as of this
+		writing.
+
+  ICUDATADIR	The directory where portable ICU data are. This is
+	        defined as $(datadir)/icu/$(VERSION).
+  ICULIBDIR	The directory where platform-specific ICU data
+		are. This is defined as $(libdir)/icu/$(VERSION).
+  ICUSYSCONFDIR	The directory where ICU configuration files are. This
+		is defined as $(sysconfdir)/icu.
+
+When referring to libraries, .so will be used to denote the extension
+of a shared library, and .a to denote the extension of a static
+library. These extensions will actually be different on some platforms.
+
++ Configuration and compilation of ICU
+
+ICU should be configured with the following options:
+
+  --with-data-packaging=files
+  --disable-rpath
+  --enable-shared
+  --enable-static
+  --without-samples
+
+in addition to platform-specific settings (like a specific mandir or
+sysconfdir). Note that the use of --disable-rpath assumes that the
+packaging is made for a standard location, or that the package
+installation/deinstallation will correctly manage the configuration
+of the system's dyanmic loader. This is the right way of doing things.
+
+The configure script invokation should also be done with
+
+  CFLAGS="-O2"
+
+set, as in:
+
+  $ CFLAGS="-O2" ./configure ...
+
+The files packaging mode is chosen because it offers the maximum
+flexibility. Packages can be split easily, and system administrators
+can add converters, aliases, and other resources with little
+effort. Ideally, the ICU build will be modified to allow for distributing a
+libicudata.so with all the converters and locales, but indexes and aliases
+as separate files. But for now, this is the easiest way to get started.
+
++ The ICU libraries package
+
+The ICU libraries package is typically named `libicuXX' where XX is
+the major number of ICU's libraries. This number is ICU's version
+number multiplied by 10 and rounded down to the nearest integer (it is
+also the value of the LIB_VERSION_MAJOR configure substitution
+variable). For example, for ICU 1.6.0.1, it is 16, so the package name
+is `libicu16'. The major version is part of the package name to allow
+for the simultaneous installation of different ICU releases.
+
+This package contains:
+
+- All the shared libraries, and their major number symbolic link, but
+not the .so symbolic link that is only used at link time (this one is
+part of the development package). These are $(libdir)/libicu*.so.* and
+$(libdir)/libustdio.so.* at the time of this writing.
+
++ The ICU package
+
+The ICU package is simply named `icu'.  It provides data used by the ICU
+libraries package and commands to create and manipulate that data.
+
+This package contains:
+
+- The Unicode data files (uprops.dat and unames.dat as of this writing).
+- The time zones data files (tz.dat).
+- All the binary data files for converters (.cnv files).
+- All the ICU commands.
+- The manual pages for ICU commands and file formats.
+
++ The ICU locales package
+
+The ICU locales package is named `icu-locales'. It provides data used by
+internationalization support in ICU.
+
+This package contains:
+
+- All the data for locales in ICU (.dat files).
+- All the break data for specific locales (.brk files).
+
++ The ICU development package
+
+The ICU developpment package is named `libicu-dev'. It provides all
+the files necessary to write applications that use ICU, along with
+examples and some documentation.
+
+This package contains:
+
+- The /usr/include/unicode directory which contains all the ICU
+headers.
+- The .so symbolic links used by the linker to link against the
+latest version of the libraries.
+- A sample Makefile fragment that can be included by applications
+using ICU, to faciliate their building, along with a platform-specific
+configuration file included by this fragment.
+- The sample applications from the ICU source tree, in an appropriate
+location for the system that the package is installed on (for example,
+on Debian, in /usr/share/doc/libicu-dev/examples).
+
+This package depends on the ICU libraries package with the exact same
+version, since it provides .so symbolic links to the latest libraries.
+
++ The ICU docs package
+
+The ICU docs package is named `libicu-doc'. It contains the files
+generated by doxygen when the `make doc' command is executed, in a
+location appropriate for the system that the package is installed on.
+
++ The ICU data package
+
+The ICU data package is named `icu-data'. It contains source files for
+the data found in the ICU package. These files are installed in
+$(ICUDATADIR).
+
++ The ICU international data package
+
+The ICU data package is named `icu-i18ndata'. It contains source files for
+the dat founf in the ICU locales package. These files are installed in
+$(ICUDATADIR).
+
+----
+Yves Arrouye <yves@realnames.com>
diff --git a/packaging/README b/packaging/README
new file mode 100644
index 0000000..1bfe85a
--- /dev/null
+++ b/packaging/README
@@ -0,0 +1,13 @@
+Copyright (C) 2000-2003, International Business Machines
+Corporation and others.  All Rights Reserved.
+
+This directory contains information, input files and scripts for
+packaging ICU using specific packaging tools. We assume that the
+packager is familiar with the tools and procedures needed to build a
+package for a given packaging method (for example, how to use
+dpkg-buildpackage(1) on Debian GNU/Linux, or rpm(8) on distributions that
+use RPM packages).
+
+Please read the file PACKAGES if you are interested in packaging ICU
+yourself. It describes what the different packages should be, and what
+their contents are.
diff --git a/packaging/debian/README b/packaging/debian/README
new file mode 100644
index 0000000..0388625
--- /dev/null
+++ b/packaging/debian/README
@@ -0,0 +1,5 @@
+// Copyright (c) 2000-2003 International Business Machines
+// Corporation and others. All Rights Reserved.
+The Debian packaging is in the debian directory at the toplevel of ICU's
+distribution.
+
diff --git a/packaging/rpm/icu.spec b/packaging/rpm/icu.spec
new file mode 100644
index 0000000..6a1e63b
--- /dev/null
+++ b/packaging/rpm/icu.spec
@@ -0,0 +1,228 @@
+#   Copyright (C) 2000-2005, International Business Machines
+#   Corporation and others.  All Rights Reserved.
+#
+# RPM specification file for ICU.
+#
+# Neal Probert <nprobert@walid.com> is the current maintainer.
+# Yves Arrouye <yves@realnames.com> is the original author.
+
+# This file can be freely redistributed under the same license as ICU.
+
+Name: icu
+Version: 3.4
+Release: 1
+Requires: libicu34 >= %{version}
+Summary: International Components for Unicode
+Packager: Ian Holsman (CNET Networks) <ianh@cnet.com>
+Copyright: X License
+Group: System Environment/Libraries
+Source: icu-%{version}.tgz
+BuildRoot: /var/tmp/%{name}-%{version}
+%description
+ICU is a set of C and C++ libraries that provides robust and full-featured
+Unicode and locale support. The library provides calendar support, conversions
+for many character sets, language sensitive collation, date
+and time formatting, support for many locales, message catalogs
+and resources, message formatting, normalization, number and currency
+formatting, time zones support, transliteration, word, line and
+sentence breaking, etc.
+
+This package contains the Unicode character database and derived
+properties, along with converters and time zones data.
+
+This package contains the runtime libraries for ICU. It does
+not contain any of the data files needed at runtime and present in the
+`icu' and `icu-locales` packages.
+
+%package -n libicu34
+Summary: International Components for Unicode (libraries)
+Group: Development/Libraries
+%description -n libicu34
+ICU is a set of C and C++ libraries that provides robust and full-featured
+Unicode support. This package contains the runtime libraries for ICU. It does
+not contain any of the data files needed at runtime and present in the
+`icu' and `icu-locales` packages.
+
+%package -n libicu-devel
+Summary: International Components for Unicode (development files)
+Group: Development/Libraries
+Requires: libicu34 = %{version}
+%description -n libicu-devel
+ICU is a set of C and C++ libraries that provides robust and full-featured
+Unicode support. This package contains the development files for ICU.
+
+%package locales
+Summary: Locale data for ICU
+Group: System Environment/Libraries
+Requires: libicu34 >= %{version}
+%description locales
+The locale data are used by ICU to provide localization (l10n), 
+internationalization (i18n) and timezone support to ICU applications.
+This package also contains break data for various languages,
+and transliteration data.
+
+%post
+# Adjust the current ICU link in /usr/lib/icu
+
+icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+cd /usr/lib/icu
+rm -f /usr/lib/icu/current
+if test x"$icucurrent" != x
+then
+    ln -s "$icucurrent" current
+fi
+
+#ICU_DATA=/usr/share/icu/%{version}
+#export ICU_DATA
+
+%preun
+# Adjust the current ICU link in /usr/lib/icu
+
+icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n -e '/\/%{version}\//d' -e 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+cd /usr/lib/icu
+rm -f /usr/lib/icu/current
+if test x"$icucurrent" != x
+then
+    ln -s "$icucurrent" current
+fi
+
+%post -n libicu34
+ldconfig
+
+# Adjust the current ICU link in /usr/lib/icu
+
+icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+cd /usr/lib/icu
+rm -f /usr/lib/icu/current
+if test x"$icucurrent" != x
+then
+    ln -s "$icucurrent" current
+fi
+
+%preun -n libicu34
+# Adjust the current ICU link in /usr/lib/icu
+
+icucurrent=`2>/dev/null ls -dp /usr/lib/icu/* | sed -n -e '/\/%{version}\//d' -e 's,.*/\([^/]*\)/$,\1,p'| sort -rn | head -1`
+cd /usr/lib/icu
+rm -f /usr/lib/icu/current
+if test x"$icucurrent" != x
+then
+    ln -s "$icucurrent" current
+fi
+
+%prep
+%setup -q -n icu
+
+%build
+cd source
+chmod a+x ./configure
+CFLAGS="-O3" CXXFLAGS="-O" ./configure --prefix=/usr --sysconfdir=/etc --with-data-packaging=files --enable-shared --enable-static --disable-samples
+echo 'CPPFLAGS += -DICU_DATA_DIR=\"/usr/share/icu/%{version}\"' >> icudefs.mk
+make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+cd source
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc readme.html
+%doc license.html
+/usr/share/icu/%{version}/license.html
+/usr/share/icu/%{version}/icudt34l/*.cnv
+/usr/share/icu/%{version}/icudt34l/*.icu
+/usr/share/icu/%{version}/icudt34l/*.spp
+
+/usr/bin/derb
+/usr/bin/genbrk
+/usr/bin/gencnval
+/usr/bin/genrb
+/usr/bin/icu-config
+/usr/bin/makeconv
+/usr/bin/pkgdata
+/usr/bin/uconv
+
+/usr/sbin/decmn
+/usr/sbin/genccode
+/usr/sbin/gencmn
+/usr/sbin/gensprep
+/usr/sbin/genuca
+/usr/sbin/icuswap
+/usr/share/icu/%{version}/mkinstalldirs
+
+/usr/man/man1/derb.1.*
+/usr/man/man1/gencnval.1.*
+/usr/man/man1/genrb.1.*
+/usr/man/man1/icu-config.1.*
+/usr/man/man1/makeconv.1.*
+/usr/man/man1/pkgdata.1.*
+/usr/man/man1/uconv.1.*
+/usr/man/man8/decmn.8.*
+/usr/man/man8/genccode.8.*
+/usr/man/man8/gencmn.8.*
+/usr/man/man8/gensprep.8.*
+/usr/man/man8/genuca.8.*
+
+%files -n icu-locales
+/usr/share/icu/%{version}/icudt34l/*.brk
+/usr/share/icu/%{version}/icudt34l/*.res
+/usr/share/icu/%{version}/icudt34l/coll/*.res
+/usr/share/icu/%{version}/icudt34l/rbnf/*.res
+/usr/share/icu/%{version}/icudt34l/translit/*.res
+
+%files -n libicu34
+%doc license.html
+/usr/lib/libicui18n.so.34
+/usr/lib/libicui18n.so.34.0
+/usr/lib/libicutu.so.34
+/usr/lib/libicutu.so.34.0
+/usr/lib/libicuuc.so.34
+/usr/lib/libicuuc.so.34.0
+/usr/lib/libicudata.so.34
+/usr/lib/libicudata.so.34.0
+/usr/lib/libicuio.so.34
+/usr/lib/libicuio.so.34.0
+/usr/lib/libiculx.so.34
+/usr/lib/libiculx.so.34.0
+/usr/lib/libicule.so.34
+/usr/lib/libicule.so.34.0
+
+%files -n libicu-devel
+%doc readme.html
+%doc license.html
+/usr/lib/libicui18n.so
+/usr/lib/libsicui18n.a
+/usr/lib/libicuuc.so
+/usr/lib/libsicuuc.a
+/usr/lib/libicutu.so
+/usr/lib/libsicutu.a
+/usr/lib/libicuio.so
+/usr/lib/libsicuio.a
+/usr/lib/libicudata.so
+/usr/lib/libsicudata.a
+/usr/lib/libicule.so
+/usr/lib/libsicule.a
+/usr/lib/libiculx.so
+/usr/lib/libsiculx.a
+/usr/include/unicode/*.h
+/usr/include/layout/*.h
+/usr/lib/icu/%{version}/Makefile.inc
+/usr/lib/icu/Makefile.inc
+/usr/share/icu/%{version}/config
+/usr/share/doc/icu-%{version}/*
+
+%changelog
+* Mon Jun 07 2004 Alexei Dets <adets@idsk.com>
+- update to 3.0
+* Tue Aug 16 2003 Steven Loomis <srl@jtcsv.com>
+- update to 2.6.1 - include license
+* Thu Jun 05 2003 Steven Loomis <srl@jtcsv.com>
+- Update to 2.6
+* Fri Dec 27 2002 Steven Loomis <srl@jtcsv.com>
+- Update to 2.4 spec
+* Fri Sep 27 2002 Steven Loomis <srl@jtcsv.com>
+- minor updates to 2.2 spec. Rpath is off by default, don't pass it as an option.
+* Mon Sep 16 2002 Ian Holsman <ian@holsman.net> 
+- update to icu 2.2
+
diff --git a/readme.html b/readme.html
new file mode 100644
index 0000000..274e47b
--- /dev/null
+++ b/readme.html
@@ -0,0 +1,1680 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+  <head>
+
+    <title>ReadMe for ICU</title>
+    <meta name="COPYRIGHT" content=
+    "Copyright (c) 1997-2007 IBM Corporation and others. All Rights Reserved." />
+    <meta name="KEYWORDS" content=
+    "ICU; International Components for Unicode; ICU4C; what's new; readme; read me; introduction; downloads; downloading; building; installation;" />
+    <meta name="DESCRIPTION" content=
+    "The introduction to the International Components for Unicode with instructions on building, installation, usage and other information about ICU." />
+    <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+<style type="text/css">
+/*<![CDATA[*/
+    h1 {border-width: 2px; border-style: solid; text-align: center; width: 100%; font-size: 200%; font-weight: bold}
+    h2 {margin-top: 3em; text-decoration: underline; page-break-before: always}
+    h2.TOC {page-break-before: auto}
+    h3 {margin-top: 2em; text-decoration: underline}
+    h4 {text-decoration: underline}
+    h5 {text-decoration: underline}
+    caption {font-weight: bold; text-align: left}
+    div.indent {margin-left: 2em}
+    ul.TOC {list-style-type: none}
+    samp {margin-left: 1em; border-style: groove; padding: 1em; display: block; background-color: #EEEEEE}
+/*]]>*/
+</style>
+  </head>
+
+  <body>
+    <h1>International Components for Unicode<br />
+     <abbr title="International Components for Unicode">ICU</abbr> 3.8
+    ReadMe</h1>
+
+    <p>Version: 2007 September 12<br />
+     Copyright &copy; 1997-2007 International Business Machines Corporation and
+    others. All Rights Reserved.</p>
+    <!-- Remember that there is a copyright at the end too -->
+    <hr />
+
+    <h2 class="TOC">Table of Contents</h2>
+
+    <ul class="TOC">
+      <li><a href="#Introduction">Introduction</a></li>
+
+      <li><a href="#GettingStarted">Getting Started</a></li>
+
+      <li><a href="#News">What Is New In This release?</a></li>
+
+      <li><a href="#Download">How To Download the Source Code</a></li>
+
+      <li><a href="#SourceCode">ICU Source Code Organization</a></li>
+
+      <li>
+        <a href="#HowToBuild">How To Build And Install ICU</a> 
+
+        <ul class="TOC">
+          <li><a href="#HowToBuildSupported">Supported Platforms</a></li>
+
+          <li><a href="#HowToBuildWindows">Windows</a></li>
+
+          <li><a href="#HowToBuildCygwin">Cygwin</a></li>
+
+          <li><a href="#HowToBuildUNIX">UNIX</a></li>
+
+          <li><a href="#HowToBuildZOS">z/OS (os/390)</a></li>
+
+          <li><a href="#HowToBuildOS400">i5/OS (OS/400 iSeries)</a></li>
+        </ul>
+      </li>
+
+      <li><a href="#HowToPackage">How To Package ICU</a></li>
+
+      <li>
+        <a href="#ImportantNotes">Important Notes About Using ICU</a> 
+
+        <ul class="TOC">
+          <li><a href="#ImportantNotesMultithreaded">Using ICU in a Multithreaded
+          Environment</a></li>
+
+          <li><a href="#ImportantNotesWindows">Windows Platform</a></li>
+
+          <li><a href="#ImportantNotesUNIX">UNIX Type Platforms</a></li>
+        </ul>
+      </li>
+
+      <li>
+        <a href="#PlatformDependencies">Platform Dependencies</a> 
+
+        <ul class="TOC">
+          <li><a href="#PlatformDependenciesNew">Porting To A New
+          Platform</a></li>
+
+          <li><a href="#PlatformDependenciesImpl">Platform Dependent
+          Implementations</a></li>
+        </ul>
+      </li>
+    </ul>
+    <hr />
+
+    <h2><a name="Introduction" href="#Introduction" id=
+    "Introduction">Introduction</a></h2>
+
+    <p>Today's software market is a global one in which it is desirable to
+    develop and maintain one application (single source/single binary) that
+    supports a wide variety of languages. The International Components for
+    Unicode (ICU) libraries provide robust and full-featured Unicode services on
+    a wide variety of platforms to help this design goal. The ICU libraries
+    provide support for:</p>
+
+    <ul>
+      <li>The latest version of the Unicode standard</li>
+
+      <li>Character set conversions with support for over 220 codepages</li>
+
+      <li>Locale data for more than 250 locales</li>
+
+      <li>Language sensitive text collation (sorting) and searching based on the
+      Unicode Collation Algorithm (=ISO 14651)</li>
+
+      <li>Regular expression matching and Unicode sets</li>
+
+      <li>Transformations for normalization, upper/lowercase, script
+      transliterations (50+ pairs)</li>
+
+      <li>Resource bundles for storing and accessing localized information</li>
+
+      <li>Date/Number/Message formatting and parsing of culture specific
+      input/output formats</li>
+
+      <li>Calendar specific date and time manipulation</li>
+
+      <li>Complex text layout for Arabic, Hebrew, Indic and Thai</li>
+
+      <li>Text boundary analysis for finding characters, word and sentence
+      boundaries</li>
+    </ul>
+
+    <p>ICU has a sister project ICU4J that extends the internationalization
+    capabilities of Java to a level similar to ICU. The ICU C/C++ project is also
+    called ICU4C when a distinction is necessary.</p>
+
+    <h2><a name="GettingStarted" href="#GettingStarted" id=
+    "GettingStarted">Getting started</a></h2>
+
+    <p>This document describes how to build and install ICU on your machine. For
+    other information about ICU please see the following table of links.<br />
+     The ICU homepage also links to related information about writing
+    internationalized software.</p>
+
+    <table border="1" cellpadding="3" width="100%" summary=
+    "These are some useful links regarding ICU and internationalization in general.">
+      <caption>
+        Here are some useful links regarding ICU and internationalization in
+        general.
+      </caption>
+
+      <tr>
+        <td>ICU, ICU4C &amp; ICU4J Homepage</td>
+
+        <td><a href=
+        "http://www.icu-project.org/">http://www.icu-project.org/</a></td>
+      </tr>
+
+      <tr>
+        <td>FAQ - Frequently Asked Questions about ICU</td>
+
+        <td><a href=
+        "http://www.icu-project.org/userguide/icufaq.html">http://www.icu-project.org/userguide/icufaq.html</a></td>
+      </tr>
+
+      <tr>
+        <td>ICU User's Guide</td>
+
+        <td><a href=
+        "http://www.icu-project.org/userguide/">http://www.icu-project.org/userguide/</a></td>
+      </tr>
+
+      <tr>
+        <td>Download ICU Releases</td>
+
+        <td><a href=
+        "http://www.icu-project.org/download/">http://www.icu-project.org/download/</a></td>
+      </tr>
+
+      <tr>
+        <td>ICU4C API Documentation Online</td>
+
+        <td><a href=
+        "http://www.icu-project.org/apiref/icu4c/">http://www.icu-project.org/apiref/icu4c/</a></td>
+      </tr>
+
+      <tr>
+        <td>Online ICU Demos</td>
+
+        <td><a href=
+        "http://demo.icu-project.org/icu-bin/icudemos">http://demo.icu-project.org/icu-bin/icudemos</a></td>
+      </tr>
+
+      <tr>
+        <td>Contacts and Bug Reports/Feature Requests</td>
+
+        <td><a href=
+        "http://www.icu-project.org/contacts.html">http://www.icu-project.org/contacts.html</a></td>
+      </tr>
+    </table>
+
+    <p><strong>Important:</strong> Please make sure you understand the <a href=
+    "license.html">Copyright and License Information</a>.</p>
+
+    <h2><a name="News" href="#News" id="News">What is new in this
+    release?</a></h2>
+
+    <p>The following list concentrates on <em>changes that affect existing
+    applications migrating from previous ICU releases</em>. For more news about
+    this release, see the <a href="http://www.icu-project.org/download/">ICU 3.8
+    download page</a>.</p>
+
+    <h3><a name="News_timezone" id="News_timezone">Changes to timezone formatting
+    and parsing</a></h3>
+
+    <p>In ICU 3.8, the behavior of date formatting and parsing has changed
+    significantly, perhaps requiring recoding on your part depending on your
+    usage. For more information, see <a href="http://icu-project.org/userguide/formatDateTime.html">
+	Formatting Dates and Times</a> in the User Guide.</p>
+
+    <h2><a name="Download" href="#Download" id="Download">How To Download the
+    Source Code</a></h2>
+
+    <p>There are two ways to download ICU releases:</p>
+
+    <ul>
+      <li><strong>Official Release Snapshot:</strong><br />
+       If you want to use ICU (as opposed to developing it), you should download
+      an official packaged version of the ICU source code. These versions are
+      tested more thoroughly than day-to-day development builds of the system,
+      and they are packaged in zip and tar files for convenient download. These
+      packaged files can be found at <a href=
+      "http://www.icu-project.org/download/">http://www.icu-project.org/download/</a>.<br />
+       The packaged snapshots are named <strong>icu-nnnn.zip</strong> or
+      <strong>icu-nnnn.tgz</strong>, where nnnn is the version number. The .zip
+      file is used for Windows platforms, while the .tgz file is preferred on
+      most other platforms.<br />
+       Please unzip this file. It will reconstruct the source directory, which
+      includes anonymous CVS control directories (see below).</li>
+
+      <li><strong>CVS Source Repository:</strong><br />
+       If you are interested in developing features, patches, or bug fixes for
+      ICU, you should probably be working with the latest version of the ICU
+      source code. You will need to check the code out of our CVS repository to
+      ensure that you have the most recent version of all of the files. See our
+      <a href="http://www.icu-project.org/repository/">source
+      repository</a> for details.</li>
+    </ul>
+
+    <h2><a name="SourceCode" href="#SourceCode" id="SourceCode">ICU Source Code
+    Organization</a></h2>
+
+    <p>In the descriptions below, <strong><i>&lt;ICU&gt;</i></strong> is the full
+    path name of the ICU directory (the top level directory from the distribution
+    archives) in your file system. You can also view the <a href=
+    "http://www.icu-project.org/userguide/design.html">ICU Architectural
+    Design</a> section of the User's Guide to see which libraries you need for
+    your software product. You need at least the data (<code>[lib]icudt</code>)
+    and the common (<code>[lib]icuuc</code>) libraries in order to use ICU.</p>
+
+    <table border="1" cellpadding="0" width="100%" summary=
+    "The following files describe the code drop.">
+      <caption>
+        The following files describe the code drop.
+      </caption>
+
+      <tr>
+        <th scope="col">File</th>
+
+        <th scope="col">Description</th>
+      </tr>
+
+      <tr>
+        <td>readme.html</td>
+
+        <td>Describes the International Components for Unicode (this file)</td>
+      </tr>
+
+      <tr>
+        <td>license.html</td>
+
+        <td>Contains the text of the ICU license</td>
+      </tr>
+    </table>
+
+    <p><br />
+    </p>
+
+    <table border="1" cellpadding="0" width="100%" summary=
+    "The following directories contain source code and data files.">
+      <caption>
+        The following directories contain source code and data files.
+      </caption>
+
+      <tr>
+        <th scope="col">Directory</th>
+
+        <th scope="col">Description</th>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>common</b>/</td>
+
+        <td>The core Unicode and support functionality, such as resource bundles,
+        character properties, locales, codepage conversion, normalization,
+        Unicode properties, Locale, and UnicodeString.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>i18n</b>/</td>
+
+        <td>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.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>layout</b>/</td>
+
+        <td>Contains the ICU layout engine (not a rasterizer).</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>io</b>/</td>
+
+        <td>Contains the ICU I/O library.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>data</b>/</td>
+
+        <td>
+          <p>This directory contains the source data in text format, which is
+          compiled into binary form during the ICU build process. It contains
+          several subdirectories, in which the data files are grouped by
+          function. Note that the build process must be run again after any
+          changes are made to this directory.</p>
+
+          <p>If some of the following directories are missing, it's probably
+          because you got an official download. If you need the data source files
+          for customization, then please download the ICU source code from <a
+          href="http://www.icu-project.org/repository/">subversion</a>.</p>
+
+          <ul>
+            <li><b>in/</b> A directory that contains a pre-built data library for
+            ICU. A standard source code package will contain this file without
+            several of the following directories. This is to simplify the build
+            process for the majority of users and to reduce platform porting
+            issues.</li>
+
+            <li><b>brkitr/</b> Data files for character, word, sentence, title
+            casing and line boundary analysis.</li>
+
+            <li><b>locales/</b> These .txt files contain ICU language and
+            culture-specific localization data. Two special bundles are
+            <b>root</b>, which is the fallback data and parent of other bundles,
+            and <b>index</b>, which contains a list of installed bundles. The
+            makefile <b>resfiles.mk</b> contains the list of resource bundle
+            files.</li>
+
+            <li><b>mappings/</b> Here are the code page converter tables. These
+            .ucm files contain mappings to and from Unicode. These are compiled
+            into .cnv files. <b>convrtrs.txt</b> is the alias mapping table from
+            various converter name formats to ICU internal format and vice versa.
+            It produces cnvalias.icu. The makefiles <b>ucmfiles.mk,
+            ucmcore.mk,</b> and <b>ucmebcdic.mk</b> contain the list of
+            converters to be built.</li>
+
+            <li><b>translit/</b> This directory contains transliterator rules as
+            resource bundles, a makefile <b>trnsfiles.mk</b> containing the list
+            of installed system translitaration files, and as well the special
+            bundle <b>translit_index</b> which lists the system transliterator
+            aliases.</li>
+
+            <li><b>unidata/</b> This directory contains the Unicode data files.
+            Please see <a href=
+            "http://www.unicode.org/">http://www.unicode.org/</a> for more
+            information.</li>
+
+            <li><b>misc/</b> The misc directory contains other data files which
+            did not fit into the above categories. Currently it only contains
+            time zone information, and a name preperation file for <a href=
+            "http://www.ietf.org/rfc/rfc3490.txt">IDNA</a>.</li>
+
+            <li><b>out/</b> This directory contains the assembled memory mapped
+            files.</li>
+
+            <li><b>out/build/</b> This directory contains intermediate (compiled)
+            files, such as .cnv, .res, etc.</li>
+          </ul>
+
+          <p>If you are creating a special ICU build, you can set the ICU_DATA
+          environment variable to the out/ or the out/build/ directories, but
+          this is generally discouraged because most people set it incorrectly.
+          You can view the <a href=
+          "http://www.icu-project.org/userguide/icudata.html">ICU Data
+          Management</a> section of the ICU User's Guide for details.</p>
+        </td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/test/<b>intltest</b>/</td>
+
+        <td>A test suite including all C++ APIs. For information about running
+        the test suite, see the build instructions specific to your platform
+        later in this document.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/test/<b>cintltst</b>/</td>
+
+        <td>A test suite written in C, including all C APIs. For information
+        about running the test suite, see the build instructions specific to your
+        platform later in this document.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/test/<b>iotest</b>/</td>
+
+        <td>A test suite written in C and C++ to test the icuio library. For
+        information about running the test suite, see the build instructions
+        specific to your platform later in this document.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/test/<b>testdata</b>/</td>
+
+        <td>Source text files for data, which are read by the tests. It contains
+        the subdirectories <b>out/build/</b> which is used for intermediate
+        files, and <b>out/</b> which contains <b>testdata.dat.</b></td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>tools</b>/</td>
+
+        <td>Tools for generating the data files. Data files are generated by
+        invoking <i>&lt;ICU&gt;</i>/source/data/build/makedata.bat on Win32 or
+        <i>&lt;ICU&gt;</i>/source/make on UNIX.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>samples</b>/</td>
+
+        <td>Various sample programs that use ICU</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>extra</b>/</td>
+
+        <td>Non-supported API additions. Currently, it contains the 'uconv' tool
+        to perform codepage conversion on files.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/<b>packaging</b>/<br />
+         <i>&lt;ICU&gt;</i>/<b>debian</b>/</td>
+
+        <td>These directories contain scripts and tools for packaging the final
+        ICU build for various release platforms.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>config</b>/</td>
+
+        <td>Contains helper makefiles for platform specific build commands. Used
+        by 'configure'.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/source/<b>allinone</b>/</td>
+
+        <td>Contains top-level ICU workspace and project files, for instance to
+        build all of ICU under one MSVC project.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/<b>include</b>/</td>
+
+        <td>Contains the headers needed for developing software that uses ICU on
+        Windows.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/<b>lib</b>/</td>
+
+        <td>Contains the import libraries for linking ICU into your Windows
+        application.</td>
+      </tr>
+
+      <tr>
+        <td><i>&lt;ICU&gt;</i>/<b>bin</b>/</td>
+
+        <td>Contains the libraries and executables for using ICU on Windows.</td>
+      </tr>
+    </table>
+    <!-- end of ICU structure ==================================== -->
+
+    <h2><a name="HowToBuild" href="#HowToBuild" id="HowToBuild">How To Build And
+    Install ICU</a></h2>
+
+    <h3><a name="HowToBuildSupported" href="#HowToBuildSupported" id=
+    "HowToBuildSupported">Supported Platforms</a></h3>
+
+    <table border="1" cellpadding="3" summary=
+    "ICU can be built on many platforms.">
+      <caption>
+        Here is a status of functionality of ICU on several different platforms.
+      </caption>
+
+      <tr>
+        <th scope="col">Operating system</th>
+
+        <th scope="col">Compiler</th>
+
+        <th scope="col">Testing frequency</th>
+      </tr>
+
+      <tr>
+        <td>Windows XP</td>
+
+        <td>Microsoft Visual C++ .NET 2005 (8.0)</td>
+
+        <td>Reference platform</td>
+      </tr>
+
+      <tr>
+        <td>Red Hat Enterprise Linux 5</td>
+
+        <td>gcc 4.1.1</td>
+
+        <td>Reference platform</td>
+      </tr>
+
+      <tr>
+        <td>AIX 5.3</td>
+
+        <td>Visual Age C++ 8.0</td>
+
+        <td>Reference platform</td>
+      </tr>
+
+      <tr>
+        <td>Solaris 10 (SunOS 5.10)</td>
+
+        <td>Sun Studio 11 (Sun C++ 5.8)</td>
+
+        <td>Reference platform</td>
+      </tr>
+
+      <tr>
+        <td>HP-UX 11.23 (IA64)</td>
+
+        <td>aCC A.06.10</td>
+
+        <td>Reference platform</td>
+      </tr>
+
+      <tr>
+        <td>Red Hat Enterprise Linux 4 Update 4</td>
+
+        <td>gcc 3.4.4</td>
+
+        <td>Regularly tested</td>
+      </tr>
+
+      <tr>
+        <td>AIX 5.2</td>
+
+        <td>Visual Age C++ 6.0</td>
+
+        <td>Regularly tested</td>
+      </tr>
+
+      <tr>
+        <td>Solaris 9 (SunOS 5.9)</td>
+
+        <td>Sun Studio 8 (Sun C++ 5.5)</td>
+
+        <td>Regularly tested</td>
+      </tr>
+
+      <tr>
+        <td>HP-UX 11.11 (PA-RISC)</td>
+
+        <td>aCC A.03.50<br />
+         cc B.11.11.08</td>
+
+        <td>Regularly tested</td>
+      </tr>
+
+      <tr>
+        <td>Windows 2000 with Cygwin</td>
+
+        <td>Microsoft Visual C++ .NET 2003 (7.1)</td>
+
+        <td>Regularly tested</td>
+      </tr>
+
+      <tr>
+        <td>Windows Vista x86</td>
+
+        <td>Microsoft Visual C++ .NET 2005 (8.0)</td>
+
+        <td>Regularly tested</td>
+      </tr>
+
+      <tr>
+        <td>Mac OS X (10.4)</td>
+
+        <td>gcc 4.0.1</td>
+
+        <td>Regularly tested</td>
+      </tr>
+
+      <tr>
+        <td>Solaris 10</td>
+
+        <td>gcc 4.0.3</td>
+
+        <td>Regularly tested</td>
+      </tr>
+
+      <tr>
+        <td>SUSE Linux Enterprise Server 9 SP1</td>
+
+        <td>Intel C++ Compiler 9.0</td>
+
+        <td>Regularly tested</td>
+      </tr>
+
+      <tr>
+        <td>z/OS 1.7</td>
+
+        <td>cxx 1.7</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>Cygwin</td>
+
+        <td>gcc 3.4.4</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>i5/OS (OS/400 iSeries) V5R3</td>
+
+        <td>iCC</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>Windows Vista x64</td>
+
+        <td>Microsoft Visual C++ .NET 2005 (8.0)</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>MinGW</td>
+
+        <td>gcc</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>NetBSD, OpenBSD, FreeBSD</td>
+
+        <td>gcc</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>SUSE Linux Enterprise Server 9 (PowerPC)</td>
+
+        <td>Visual Age 8.0</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>QNX</td>
+
+        <td>gcc</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>BeOS</td>
+
+        <td>gcc</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>SGI/IRIX</td>
+
+        <td>MIPSpro CC</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>Tru64 (OSF)</td>
+
+        <td>Compaq's cxx compiler</td>
+
+        <td>Rarely tested</td>
+      </tr>
+
+      <tr>
+        <td>MP-RAS</td>
+
+        <td>NCR MP-RAS C/C++ Compiler</td>
+
+        <td>Rarely tested</td>
+      </tr>
+    </table>
+
+    <p><br />
+    </p>
+
+    <h4>Key to testing frequency</h4>
+
+    <dl>
+      <dt><i>Reference platform</i></dt>
+
+      <dd>ICU will work on these platforms with these compilers</dd>
+
+      <dt><i>Regularly tested</i></dt>
+
+      <dd>ICU should work on these platforms with these compilers</dd>
+
+      <dt><i>Rarely tested</i></dt>
+
+      <dd>ICU has been ported to these platforms but may not have been tested
+      there recently</dd>
+    </dl>
+
+    <h3><a name="HowToBuildWindows" href="#HowToBuildWindows" id=
+    "HowToBuildWindows">How To Build And Install On Windows</a></h3>
+
+    <p>Building International Components for Unicode requires:</p>
+
+    <ul>
+      <li>Microsoft Windows 2000 or above</li>
+
+      <li>Microsoft Visual C++ 2003</li>
+
+      <li><a href="#HowToBuildCygwin">Cygwin</a> is required when other versions
+      of Microsoft Visual C++ and other compilers are used to build ICU.</li>
+    </ul>
+
+    <p>The steps are:</p>
+
+    <ol>
+      <li>Unzip the icu-XXXX.zip file into any convenient location. Using command
+      line zip, type "unzip -a icu-XXXX.zip -d drive:\directory", or just use
+      WinZip.</li>
+
+      <li>Be sure that the ICU binary directory, <i>&lt;ICU&gt;</i>\bin\, is
+      included in the <strong>PATH</strong> environment variable. The tests will
+      not work without the location of the ICU DLL files in the path.</li>
+
+      <li>Open the "<i>&lt;ICU&gt;</i>\source\allinone\allinone.sln" workspace
+      file in Microsoft Visual Studio .NET 2003. (This solution includes all the
+      International Components for Unicode libraries, necessary ICU building
+      tools, and the test suite projects). Please see the <a href=
+      "#HowToBuildWindowsCommandLine">command line note below</a> if you want to
+      build from the command line instead.</li>
+
+      <li>Set the active configuration to "Debug" or "Release" (See <a href=
+      "#HowToBuildWindowsConfig">Windows configuration note</a> below).</li>
+
+      <li>Choose the "Build" menu and select "Rebuild Solution". If you want to
+      build the Debug and Release at the same time, see the <a href=
+      "#HowToBuildWindowsBatch">batch configuration note</a> below.</li>
+
+      <li>Run the C++ test suite, "intltest". To do this: set the active startup
+      project to "intltest", and press Ctrl+F5 to run it. Make sure that it
+      passes without any errors.</li>
+
+      <li>Run the C test suite, "cintltst". To do this: set the active startup
+      project to "cintltst", and press Ctrl+F5 to run it. Make sure that it
+      passes without any errors.</li>
+
+      <li>Run the I/O test suite, "iotest". To do this: set the active startup
+      project to "iotest", and press Ctrl+F5 to run it. Make sure that it passes
+      without any errors.</li>
+
+      <li>You are now able to develop applications with ICU by using the
+      libraries and tools in <i>&lt;ICU&gt;</i>\bin\. The headers are in
+      <i>&lt;ICU&gt;</i>\include\ and the link libraries are in
+      <i>&lt;ICU&gt;</i>\lib\. To install the ICU runtime on a machine, or ship
+      it with your application, copy the needed components from
+      <i>&lt;ICU&gt;</i>\bin\ to a location on the system PATH or to your
+      application directory.</li>
+    </ol>
+
+    <p><a name="HowToBuildWindowsCommandLine" id=
+    "HowToBuildWindowsCommandLine"><strong>Using MSDEV At The Command Line
+    Note:</strong></a> 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, 'devenv.com
+    <i>&lt;ICU&gt;</i>\source\allinone\allinone.sln /build Release'. You can also
+    use Cygwin with this compiler to build ICU, and you can refer to the <a href=
+    "#HowToBuildCygwin">How To Build And Install On Windows with Cygwin</a>
+    section for more details.</p>
+
+    <p><a name="HowToBuildWindowsConfig" id=
+    "HowToBuildWindowsConfig"><strong>Setting Active Configuration
+    Note:</strong></a> To set the active configuration, two different
+    possibilities are:</p>
+
+    <ul>
+      <li>Choose "Build" menu, select "Configuration Manager...", and select
+      "Release" or "Debug" for the Active Configuration Solution.</li>
+
+      <li>Another way is to select the desired build configuration from "Solution
+      Configurations" dropdown menu from the standard toolbar. It will say
+      "Release" or "Debug" in the dropdown list.</li>
+    </ul>
+
+    <p><a name="HowToBuildWindowsBatch" id="HowToBuildWindowsBatch"><strong>Batch
+    Configuration Note:</strong></a> If you want to build the Debug and Release
+    configurations at the same time, choose "Build" menu, and select "Batch
+    Build...". Click the "Select All" button, and then click the "Rebuild"
+    button.</p>
+
+    <h3><a name="HowToBuildCygwin" href="#HowToBuildCygwin" id=
+    "HowToBuildCygwin">How To Build And Install On Windows with Cygwin</a></h3>
+
+    <p>Building International Components for Unicode with this configuration
+    requires:</p>
+
+    <ul>
+      <li>Microsoft 2000 or above</li>
+
+      <li>Microsoft Visual C++ 2003 or above (when gcc isn't used).</li>
+
+      <li>
+        Cygwin with the following installed: 
+
+        <ul>
+          <li>bash</li>
+
+          <li>GNU make</li>
+
+          <li>man (if you plan to look at the man pages)</li>
+        </ul>
+      </li>
+    </ul>
+
+    <p>There are two ways you can build ICU with Cygwin. You can build with gcc
+    or Microsoft Visual C++. If you use gcc, the resulting libraries and tools
+    will depend on the Cygwin environment. If you use Microsoft Visual C++, the
+    resulting libraries and tools do not depend on Cygwin and can be more easily
+    distributed to other Windows computers (the generated man pages and shell
+    scripts still need Cygwin). To build with gcc, please follow the "<a href=
+    "#HowToBuildUNIX">How To Build And Install On UNIX</a>" instructions, while
+    you are inside a Cygwin bash shell. To build with Microsoft Visual C++,
+    please use the following instructions:</p>
+
+    <ol>
+      <li>Start the Windows "Command Prompt" window. This is different from the
+      gcc build, which requires the Cygwin Bash command prompt. The Microsoft
+      Visual C++ compiler will not work with a bash command prompt.</li>
+
+      <li>If the computer isn't set up to use Visual C++ from the command line,
+      you need to run vcvars32.bat. For example "<tt>C:\Program Files\Microsoft
+      Visual Studio 8\VC\bin\vcvars32.bat</tt>" can be used for 32-bit builds
+      <strong>or</strong> "<tt>C:\Program Files (x86)\Microsoft Visual Studio
+      8\VC\bin\amd64\vcvarsamd64.bat</tt>" can be used for 64-bit builds on
+      Windows x64.</li>
+
+      <li>Unzip the icu-XXXX.zip file into any convenient location. Using command
+      line zip, type "unzip -a icu-XXXX.zip -d drive:\directory", or just use
+      WinZip.</li>
+
+      <li>Change directory to "icu/source", which is where you unzipped ICU.</li>
+
+      <li>Run "<tt>bash <a href="source/runConfigureICU">./runConfigureICU</a>
+      Cygwin/MSVC</tt>" (See <a href="#HowToWindowsConfigureICU">Windows
+      configuration note</a> and non-functional configure options below).</li>
+
+      <li>Type <tt>"make"</tt> to compile the libraries and all the data files.
+      This make command should be GNU make.</li>
+
+      <li>Optionally, type <tt>"make check"</tt> to run the test suite, which
+      checks for ICU's functionality integrity (See <a href=
+      "#HowToTestWithoutGmake">testing note</a> below).</li>
+
+      <li>Type <tt>"make install"</tt> to install ICU. If you used the --prefix=
+      option on configure or runConfigureICU, ICU will be installed to the
+      directory you specified. (See <a href="#HowToInstallICU">installation
+      note</a> below).</li>
+    </ol>
+
+    <p><a name="HowToWindowsConfigureICU" id=
+    "HowToWindowsConfigureICU"><strong>Configuring ICU on Windows
+    NOTE:</strong></a> In addition to the Unix <a href=
+    "#HowToConfigureICU">configuration note</a> the following configure options
+    currently do not work on Windows with Microsoft's compiler. Some options can
+    work by manually editing <tt>icu/source/common/unicode/pwin32.h</tt>, but
+    manually editing the files is not recommended.</p>
+
+    <ul>
+      <li><tt>--disable-renaming</tt></li>
+
+      <li><tt>--disable-threading</tt></li>
+
+      <li><tt>--enable-tracing</tt></li>
+
+      <li><tt>--enable-rpath</tt></li>
+
+      <li><tt>--with-iostream</tt></li>
+
+      <li><tt>--enable-static</tt> (Requires that U_STATIC_IMPLEMENTATION be
+      defined in user code that links against ICU's static libraries.)</li>
+
+      <li><tt>--with-data-packaging=files</tt> (The pkgdata tool currently does
+      not work in this mode. Manual packaging is required to use this mode.)</li>
+    </ul>
+
+    <h3><a name="HowToBuildUNIX" href="#HowToBuildUNIX" id="HowToBuildUNIX">How
+    To Build And Install On UNIX</a></h3>
+
+    <p>Building International Components for Unicode on UNIX requires:</p>
+
+    <ul>
+      <li>A C++ compiler installed on the target machine (for example: gcc, CC,
+      xlC_r, aCC, cxx, etc...).</li>
+
+      <li>An ANSI C compiler installed on the target machine (for example:
+      cc).</li>
+
+      <li>A recent version of GNU make (3.80+).</li>
+
+      <li>For a list of z/OS tools please view the <a href="#HowToBuildZOS">z/OS
+      build section</a> of this document for further details.</li>
+    </ul>
+
+    <p>Here are the steps to build ICU:</p>
+
+    <ol>
+      <li>Decompress the icu-<i>X</i>.<i>Y</i>.tgz (or
+      icu-<i>X</i>.<i>Y</i>.tar.gz) file. For example, <tt>"gunzip -d &lt;
+      icu-<i>X</i>.<i>Y</i>.tgz | tar xvf -"</tt></li>
+
+      <li>Change directory to the "icu/source".</li>
+
+      <li>Run <tt>"chmod +x runConfigureICU configure install-sh"</tt> because
+      these files may have the wrong permissions.</li>
+
+      <li>Run the <tt><a href="source/runConfigureICU">runConfigureICU</a></tt>
+      script for your platform. (See <a href="#HowToConfigureICU">configuration
+      note</a> below).</li>
+
+      <li>Type <tt>"gmake"</tt> (or "make" if GNU make is the default make on
+      your platform) to compile the libraries and all the data files. The proper
+      name of the GNU make command is printed at the end of the configuration
+      run, as in "You must use gmake to compile ICU".</li>
+
+      <li>Optionally, type <tt>"gmake check"</tt> to run the test suite, which
+      checks for ICU's functionality integrity (See <a href=
+      "#HowToTestWithoutGmake">testing note</a> below).</li>
+
+      <li>Type <tt>"gmake install"</tt> to install ICU. If you used the --prefix=
+      option on configure or runConfigureICU, ICU will be installed to the
+      directory you specified. (See <a href="#HowToInstallICU">installation
+      note</a> below).</li>
+    </ol>
+
+    <p><a name="HowToConfigureICU" id="HowToConfigureICU"><strong>Configuring ICU
+    NOTE:</strong></a> Type <tt>"./runConfigureICU --help"</tt> for help on how
+    to run it and a list of supported platforms. You may also want to type
+    <tt>"./configure --help"</tt> to print the available configure options that
+    you may want to give runConfigureICU. If you are not using the
+    runConfigureICU script, or your platform is not supported by the script, you
+    may need to set your CC, CXX, CFLAGS and CXXFLAGS environment variables, and
+    type <tt>"./configure"</tt>. Some of the more frequently used options to
+    configure are --disable-64bit-libs to create 32-bit libraries, and --srcdir
+    to do out of source builds (build the libraries in the current location).
+    HP-UX user's, please see this <a href="#ImportantNotesHPUX">note regarding
+    HP-UX multithreaded build issues</a> with newer compilers. Solaris user's,
+    please see this <a href="#ImportantNotesSolaris">note regarding Solaris
+    multithreaded build issues</a>.</p>
+
+    <p><a name="HowToTestWithoutGmake" id="HowToTestWithoutGmake"><strong>Running
+    The Tests From The Command Line NOTE:</strong></a> You may have to set
+    certain variables if you with to run test programs individually, that is
+    apart from "gmake check". The environment variable <strong>ICU_DATA</strong>
+    can be set to the full pathname of the data directory to indicate where the
+    locale data files and conversion mapping tables are when you are not using
+    the shared library (e.g. by using the .dat archive or the individual data
+    files). The trailing "/" is required after the directory name (e.g.
+    "$Root/source/data/out/" will work, but the value "$Root/source/data/out" is
+    not acceptable). You do not need to set <strong>ICU_DATA</strong> if the
+    complete shared data library is in your library path.</p>
+
+    <p><a name="HowToInstallICU" id="HowToInstallICU"><strong>Installing ICU
+    NOTE:</strong></a> 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).</p>
+
+    <h3><a name="HowToBuildZOS" href="#HowToBuildZOS" id="HowToBuildZOS">How To
+    Build And Install On z/OS (OS/390)</a></h3>
+
+    <p>You can install ICU on z/OS or OS/390 (the previous name of z/OS), but IBM
+    tests only the z/OS installation. You install ICU in a z/OS UNIX system
+    services file system such as HFS or zFS. On this platform, it is important
+    that you understand a few details:</p>
+
+    <ul>
+      <li>The makedep and GNU make tools are required for building ICU. If it
+      is not already installed on your system, it is available at the <a href=
+      "http://www.ibm.com/servers/eserver/zseries/zos/unix/redbook/">z/OS UNIX -
+      Tools and Toys</a> site. The PATH environment variable should be updated to
+      contain the location of this executable prior to build. Failure to add these
+      tools to your PATH will cause ICU build failures or cause pkgdata to fail
+      to run.</li>
+
+      <li>Since USS does not support using the mmap() function over NFS, it is
+      recommended that you build ICU on a local filesystem. Once ICU has been
+      built, you should not have this problem while using ICU when the data
+      library has been built as a shared library, which is this is the default
+      setting.</li>
+
+      <li>Encoding considerations: The source code assumes that it is compiled
+      with codepage ibm-1047 (to be exact, the UNIX System Services variant of
+      it). The pax command converts all of the source code files from ASCII to
+      codepage ibm-1047 (USS) EBCDIC. However, some files are binary files and
+      must not be converted, or must be converted back to their original state.
+      You can use the <a href="as_is/os390/unpax-icu.sh">unpax-icu.sh</a> script
+      to do this for you automatically. It will unpackage the tar file and
+      convert all the necessary files for you automatically.</li>
+
+      <li>z/OS supports both native S/390 hexadecimal floating point and (with
+      OS/390 2.6 and later) IEEE 754 binary floating point. This is a compile
+      time option. Applications built with IEEE should use ICU DLLs that are
+      built with IEEE (and vice versa). The environment variable IEEE390=0 will
+      cause the z/OS version of ICU to be built without IEEE floating point
+      support and use the native hexadecimal floating point. By default ICU is
+      built with IEEE 754 support. Native floating point support is sufficient
+      for codepage conversion, resource bundle and UnicodeString operations, but
+      the Format APIs require IEEE binary floating point.</li>
+
+      <li>z/OS introduced the concept of Extra Performance Linkage (XPLINK) to
+      bring performance improvement opportunities to call-intensive C and C++
+      applications such as ICU. XPLINK is enabled on a DLL-by-DLL basis, so if
+      you are considering using XPLINK in your application that uses ICU, you
+      should consider building the XPLINK-enabled version of ICU. You need to
+      set ICU's environment variable <code>OS390_XPLINK=1</code> prior to
+      invoking the make process to produce binaries that are enabled for
+      XPLINK. The XPLINK option, which is available for z/OS 1.2 and later,
+      requires the PTF PQ69418 to build XPLINK enabled binaries.</li>
+
+      <li>Currently in ICU 3.0, there is an issue with building on z/OS without
+      XPLINK and with the C++ iostream. By default, the iostream library on z/OS
+      is XPLINK enabled. If you are not building an XPLINK enabled version of
+      ICU, you should use the <code>--with-iostream=old</code> configure option
+      when using runConfigureICU. This will prevent applications that use the
+      icuio library from crashing.</li>
+
+      <li>The rest of the instructions for building and testing ICU on z/OS with
+      UNIX System Services are the same as the <a href="#HowToBuildUNIX">How To
+      Build And Install On UNIX</a> section.</li>
+    </ul>
+
+    <h4>z/OS (Batch/PDS) support outside the UNIX system services
+    environment</h4>
+
+    <p>By default, ICU builds its libraries into the UNIX file system (HFS). In
+    addition, there is a z/OS specific environment variable (OS390BATCH) to build
+    some libraries into the z/OS native file system. This is useful, for example,
+    when your application is externalized via Job Control Language (JCL).</p>
+
+    <p>The OS390BATCH environment variable enables non-UNIX support including the
+    batch environment. When OS390BATCH is set, the libicui18n<i>XX</i>.dll,
+    libicuuc<i>XX</i>.dll, and libicudt<i>XX</i>e.dll binaries are built into
+    data sets (the native file system). Turning on OS390BATCH does not turn off
+    the normal z/OS UNIX build. This means that the z/OS UNIX (HFS) DLLs will
+    always be created.</p>
+
+    <p>Two additional environment variables indicate the names of the z/OS data
+    sets to use. The LOADMOD environment variable identifies the name of the data
+    set that contains the dynamic link libraries (DLLs) and the LOADEXP
+    environment variable identifies the name of the data set that contains the
+    side decks, which are normally the files with the .x suffix in the UNIX file
+    system.</p>
+
+    <p>A data set is roughly equivalent to a UNIX or Windows file. For most kinds
+    of data sets the operating system maintains record boundaries. UNIX and
+    Windows files are byte streams. Two kinds of data sets are PDS and PDSE. Each
+    data set of these two types contains a directory. It is like a UNIX
+    directory. Each "file" is called a "member". Each member name is limited to
+    eight bytes, normally EBCDIC.</p>
+
+    <p>Here is an example of some environment variables that you can set prior to
+    building ICU:</p>
+<pre>
+<samp>OS390BATCH=1
+LOADMOD=<i>USER</i>.ICU.LOAD
+LOADEXP=<i>USER</i>.ICU.EXP</samp>
+</pre>
+
+    <p>The PDS member names for the DLL file names are as follows:</p>
+<pre>
+<samp>IXMI<i>XX</i>IN --&gt; libicui18n<i>XX</i>.dll
+IXMI<i>XX</i>UC --&gt; libicuuc<i>XX</i>.dll
+IXMI<i>XX</i>DA --&gt; libicudt<i>XX</i>e.dll</samp>
+</pre>
+
+    <p>You should point the LOADMOD environment variable at a partitioned data
+    set extended (PDSE) and point the LOADEXP environment variable at a
+    partitioned data set (PDS). The PDSE can be allocated with the following
+    attributes:</p>
+<pre>
+<samp>Data Set Name . . . : <i>USER</i>.ICU.LOAD
+Management class. . : <i>**None**</i>
+Storage class . . . : <i>BASE</i>
+Volume serial . . . : <i>TSO007</i>
+Device type . . . . : <i>3390</i>
+Data class. . . . . : <i>LOAD</i>
+Organization  . . . : PO
+Record format . . . : U
+Record length . . . : 0
+Block size  . . . . : <i>32760</i>
+1st extent cylinders: 1
+Secondary cylinders : 5
+Data set name type  : LIBRARY</samp>
+</pre>
+
+    <p>The PDS can be allocated with the following attributes:</p>
+<pre>
+<samp>Data Set Name . . . : <i>USER</i>.ICU.EXP
+Management class. . : <i>**None**</i>
+Storage class . . . : <i>BASE</i>
+Volume serial . . . : <i>TSO007</i>
+Device type . . . . : <i>3390</i>
+Data class. . . . . : <i>**None**</i>
+Organization  . . . : PO
+Record format . . . : FB
+Record length . . . : 80
+Block size  . . . . : <i>3200</i>
+1st extent cylinders: 3
+Secondary cylinders : 3
+Data set name type  : PDS</samp>
+</pre>
+
+    <h3><a name="HowToBuildOS400" href="#HowToBuildOS400" id=
+    "HowToBuildOS400">How To Build And Install On i5/OS (OS/400 iSeries)</a></h3>
+
+    <p>Before you start building ICU, ICU requires the following:</p>
+
+    <ul>
+      <li>QSHELL interpreter installed (install base option 30, operating system)
+      <!--li>QShell Utilities, PRPQ 5799-XEH (not required for V4R5)</li--></li>
+
+      <li>ILE C/C++ Compiler for iSeries, LPP 5722-WDS</li>
+
+      <li>The latest GNU facilities (You can get the GNU facilities for i5/OS
+      from <a href=
+      "http://www.ibm.com/servers/enable/site/porting/iseries/overview/gnu_utilities.html">
+      http://www.ibm.com/servers/enable/site/porting/iseries/overview/gnu_utilities.html</a>).
+      Older versions may not work properly.</li>
+    </ul>
+
+    <p>The following describes how to setup and build ICU. For background
+    information, you should look at the <a href="#HowToBuildUNIX">UNIX build
+    instructions</a>.</p>
+
+    <ol>
+      <li>
+        Create i5/OS target library. This library will be the target for the
+        resulting modules, programs and service programs. You will specify this
+        library on the OUTPUTDIR environment variable.
+<pre>
+<samp>CRTLIB LIB(<i>libraryname</i>)
+ADDENVVAR ENVVAR(OUTPUTDIR) VALUE('<i>libraryname</i>')</samp>
+</pre>
+      </li>
+
+      <li>
+      Set up the following environment variables and job characteristics in your build process
+<pre>
+<samp>ADDENVVAR ENVVAR(MAKE) VALUE('/usr/bin/gmake')
+CHGJOB CCSID(37)</samp>
+</pre>
+
+      <li>Run <tt>'QSH'</tt></li>
+
+      <li>Run gunzip on the ICU source code compressed tar archive
+      (icu-<i>X</i>.<i>Y</i>.tgz).</li>
+
+      <li>Run unpax-icu.sh on the tar file generated from the previous step.</li>
+
+      <li>Change your current directory to icu/source.</li>
+
+      <li>Run <tt>'./runConfigureICU i5OS'</tt>  (See <a href="#HowToConfigureICU">configuration
+      note</a> for details).</li></li>
+
+      <li>Run <tt>'gmake'</tt> to build ICU.</li>
+
+      <li>Run <tt>'gmake check QIBM_MULTI_THREADED=Y'</tt> to build and run the tests.
+      You can look at the <a href=
+      "http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/apis/concept4.htm">
+      iSeries Information Center</a> for more details regarding the running of multiple threads
+      on i5/OS.</li>
+    </ol>
+    <!-- end build environment -->
+
+    <h2><a name="HowToPackage" href="#HowToPackage" id="HowToPackage">How To
+    Package ICU</a></h2>
+
+    <p>There are many ways that a person can package ICU with their software
+    products. Usually only the libraries need to be considered for packaging.</p>
+
+    <p>On UNIX, you should use "<tt>gmake install</tt>" to make it easier to
+    develop and package ICU. The bin, lib and include directories are needed to
+    develop applications that use ICU. These directories will be created relative
+    to the "<tt>--prefix=</tt><i>dir</i>" configure option (See the <a href=
+    "#HowToBuildUNIX">UNIX build instructions</a>). When ICU is built on Windows,
+    a similar directory structure is built.</p>
+
+    <p>When changes have been made to the standard ICU distribution, it is
+    recommended that at least one of the following guidelines be followed for
+    special packaging.</p>
+
+    <ol>
+      <li>Add a suffix name to the library names. This can be done with the
+      --with-library-suffix configure option.</li>
+
+      <li>The installation script should install the ICU libraries into the
+      application's directory.</li>
+    </ol>
+
+    <p>Following these guidelines prevents other applications that use a standard
+    ICU distribution from conflicting with any libraries that you need. On
+    operating systems that do not have a standard C++ ABI (name mangling) for
+    compilers, it is recommended to do this special packaging anyway. More
+    details on customizing ICU are available in the <a href=
+    "http://www.icu-project.org/userguide/">User's Guide</a>. The <a href=
+    "#SourceCode">ICU Source Code Organization</a> section of this readme.html
+    gives a more complete description of the libraries.</p>
+
+    <table border="1" cellpadding="3" summary=
+    "ICU has several libraries for you to use.">
+      <caption>
+        Here is an example of libraries that are frequently packaged.
+      </caption>
+
+      <tr>
+        <th scope="col">Library Name</th>
+
+        <th scope="col">Windows Filename</th>
+
+        <th scope="col">Linux Filename</th>
+
+        <th scope="col">Comment</th>
+      </tr>
+
+      <tr>
+        <td>Data Library</td>
+
+        <td>icudt<i>XY</i>l.dll</td>
+
+        <td>libicudata.so.<i>XY</i>.<i>Z</i></td>
+
+        <td>Data required by the Common and I18n libraries. There are many ways
+        to package and <a href=
+        "http://www.icu-project.org/userguide/icudata.html">customize this
+        data</a>, but by default this is all you need.</td>
+      </tr>
+
+      <tr>
+        <td>Common Library</td>
+
+        <td>icuuc<i>XY</i>.dll</td>
+
+        <td>libicuuc.so.<i>XY</i>.<i>Z</i></td>
+
+        <td>Base library required by all other ICU libraries.</td>
+      </tr>
+
+      <tr>
+        <td>Internationalization (i18n) Library</td>
+
+        <td>icuin<i>XY</i>.dll</td>
+
+        <td>libicui18n.so.<i>XY</i>.<i>Z</i></td>
+
+        <td>A library that contains many locale based internationalization (i18n)
+        functions.</td>
+      </tr>
+
+      <tr>
+        <td>Layout Engine</td>
+
+        <td>icule<i>XY</i>.dll</td>
+
+        <td>libicule.so.<i>XY</i>.<i>Z</i></td>
+
+        <td>An optional engine for doing font layout.</td>
+      </tr>
+
+      <tr>
+        <td>Layout Extensions Engine</td>
+
+        <td>iculx<i>XY</i>.dll</td>
+
+        <td>libiculx.so.<i>XY</i>.<i>Z</i></td>
+
+        <td>An optional engine for doing font layout that uses parts of ICU.</td>
+      </tr>
+
+      <tr>
+        <td>ICU I/O (Unicode stdio) Library</td>
+
+        <td>icuio<i>XY</i>.dll</td>
+
+        <td>libicuio.so.<i>XY</i>.<i>Z</i></td>
+
+        <td>An optional library that provides a stdio like API with Unicode
+        support.</td>
+      </tr>
+
+      <tr>
+        <td>Tool Utility Library</td>
+
+        <td>icutu<i>XY</i>.dll</td>
+
+        <td>libicutu.so.<i>XY</i>.<i>Z</i></td>
+
+        <td>An internal library that contains internal APIs that are only used by
+        ICU's tools. If you do not use ICU's tools, you do not need this
+        library.</td>
+      </tr>
+    </table>
+
+    <p>Normally only the above ICU libraries need to be considered for packaging.
+    The versionless symbolic links to these libraries are only needed for easier
+    development. The <i>X</i>, <i>Y</i> and <i>Z</i> parts of the name are the
+    version numbers of ICU. For example, ICU 2.0.2 would have the name
+    libicuuc.so.20.2 for the common library. The exact format of the library
+    names can vary between platforms due to how each platform can handles library
+    versioning.</p>
+
+    <h2><a name="ImportantNotes" href="#ImportantNotes" id=
+    "ImportantNotes">Important Notes About Using ICU</a></h2>
+
+    <h3><a name="ImportantNotesMultithreaded" href="#ImportantNotesMultithreaded"
+    id="ImportantNotesMultithreaded">Using ICU in a Multithreaded
+    Environment</a></h3>
+
+    <p>Some versions of ICU require calling the <code>u_init()</code> function
+    from <code>uclean.h</code> to ensure that ICU is initialized properly. In
+    those ICU versions, <code>u_init()</code> must be called before ICU is used
+    from multiple threads. There is no harm in calling <code>u_init()</code> in a
+    single-threaded application, on a single-CPU machine, or in other cases where
+    <code>u_init()</code> is not required.</p>
+
+    <p>In addition to ensuring thread safety, <code>u_init()</code> also attempts
+    to load at least one ICU data file. Assuming that all data files are packaged
+    together (or are in the same folder in files mode), a failure code from
+    <code>u_init()</code> usually means that the data cannot be found. In this
+    case, the data may not be installed properly, or the application may have
+    failed to call <code>udata_setCommonData()</code> or
+    <code>u_setDataDirectory()</code> which specify to ICU where it can find its
+    data.</p>
+
+    <p>Since <code>u_init()</code> will load only one or two data files, it
+    cannot guarantee that all of the data that an application needs is available.
+    It cannot check for all data files because the set of files is customizable,
+    and some ICU services work without loading any data at all. An application
+    should always check for error codes when opening ICU service objects (using
+    <code>ucnv_open()</code>, <code>ucol_open()</code>, C++ constructors,
+    etc.).</p>
+
+    <h4>ICU 3.4 and later</h4>
+
+    <p>ICU 3.4 self-initializes properly for multi-threaded use. It achieves this
+    without performance penalty by hardcoding the core Unicode properties data,
+    at the cost of some flexibility. (For details see Jitterbug 4497.)</p>
+
+    <p><code>u_init()</code> can be used to check for data loading. It tries to
+    load the converter alias table (<code>cnvalias.icu</code>).</p>
+
+    <h4>ICU 2.6..3.2</h4>
+
+    <p>These ICU versions require a call to <code>u_init()</code> before
+    multi-threaded use. The services that are directly affected are those that
+    don't have a service object and need to be fast: normalization and character
+    properties.</p>
+
+    <p><code>u_init()</code> loads and initializes the data files for
+    normalization and character properties (<code>unorm.icu</code> and
+    <code>uprops.icu</code>) and can therefore also be used to check for data
+    loading.</p>
+
+    <h4>ICU 2.4 and earlier</h4>
+
+    <p>ICU 2.4 and earlier versions were not prepared for multithreaded use on
+    multi-CPU platforms where the CPUs implement weak memory coherency. These
+    CPUs include: Power4, Power5, Alpha, Itanium. <code>u_init()</code> was not
+    defined yet.</p>
+
+    <h4><a name="ImportantNotesHPUX" href="#ImportantNotesHPUX" id=
+    "ImportantNotesHPUX">Using ICU in a Multithreaded Environment on
+    HP-UX</a></h4>
+
+    <p>If you are building ICU with a newer aCC compiler and you are planning on
+    using the older &lt;iostream.h&gt; instead of the newer &lt;iostream&gt;, you
+    will need to use a special configure flag before building ICU. By default,
+    the aCC <a href="http://docs.hp.com/en/1405/options.htm#optioncap-AA">-AA</a>
+    flag is used on HP-UX when the compiler supports that option in order to make
+    ICU thread safe with RogueWave and other libraries using the 2.0 Standard C++
+    library. Your applications that use ICU will also need to use the <a href=
+    "http://docs.hp.com/en/1405/options.htm#optioncap-AA">-AA</a> compiler flag.
+    To turn off this behavior in ICU, you will need to use the --with-iostream=old
+    configure option when you first use runConfigureICU.</p>
+
+    <h4><a name="ImportantNotesSolaris" href="#ImportantNotesSolaris" id=
+    "ImportantNotesSolaris">Using ICU in a Multithreaded Environment on
+    Solaris</a></h4>
+
+    <h5>Linking on Solaris</h5>
+
+    <p>In order to avoid synchronization and threading issues, developers are
+    <strong>suggested</strong> to strictly follow the compiling and linking
+    guidelines for multithreaded applications, specified in the following
+    document from Sun Microsystems. Most notably, pay strict attention to the
+    following statements from Sun:</p>
+
+    <blockquote>
+      <p>To use libthread, specify -lthread before -lc on the ld command line, or
+      last on the cc command line.</p>
+
+      <p>To use libpthread, specify -lpthread before -lc on the ld command line,
+      or last on the cc command line.</p>
+    </blockquote>
+
+    <p>Failure to do this may cause spurious lock conflicts, recursive mutex
+    failure, and deadlock.</p>
+
+    <p>Source: "<i>Solaris Multithreaded Programming Guide, Compiling and
+    Debugging</i>", Sun Microsystems, Inc., Apr 2004<br />
+     <a href=
+    "http://docs.sun.com/app/docs/doc/816-5137/6mba5vpke?a=view">http://docs.sun.com/app/docs/doc/816-5137/6mba5vpke?a=view</a></p>
+
+    <h3><a name="ImportantNotesWindows" href="#ImportantNotesWindows" id=
+    "ImportantNotesWindows">Windows Platform</a></h3>
+
+    <p>If you are building on the Win32 platform, it is important that you
+    understand a few of the following build details.</p>
+
+    <h4>DLL directories and the PATH setting</h4>
+
+    <p>As delivered, the International Components for Unicode build as several
+    DLLs, which are placed in the "<i>&lt;ICU&gt;</i>\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.</p>
+
+    <h4><a name="ImportantNotesWindowsPath" id=
+    "ImportantNotesWindowsPath">Changing your PATH</a></h4>
+
+    <p><strong>Windows 2000/XP</strong>: Use the System Icon in the Control
+    Panel. Pick the "Advanced" tab. Select the "Environment Variables..."
+    button. Select the variable PATH in the lower box, and select the lower
+    "Edit..." button. In the "Variable Value" box, append the string
+    ";<i>&lt;ICU&gt;</i>\bin" to the end of the path string. If there is
+    nothing there, just type in "<i>&lt;ICU&gt;</i>\bin". Click the Set button,
+    then the OK button.</p>
+
+    <p>Note: When packaging a Windows application for distribution and
+    installation on user systems, copies of the ICU DLLs should be included with
+    the application, and installed for exclusive use by the application. This is
+    the only way to insure that your application is running with the same version
+    of ICU, built with exactly the same options, that you developed and tested
+    with. Refer to Microsoft's guidelines on the usage of DLLs, or search for the
+    phrase "DLL hell" on <a href=
+    "http://msdn.microsoft.com/">msdn.microsoft.com</a>.</p>
+
+    <h3><a name="ImportantNotesUNIX" href="#ImportantNotesUNIX" id=
+    "ImportantNotesUNIX">UNIX Type Platform</a></h3>
+
+    <p>If you are building on a UNIX platform, and if you are installing ICU in a
+    non-standard location, you may need to add the location of your ICU libraries
+    to your <strong>LD_LIBRARY_PATH</strong> or <strong>LIBPATH</strong>
+    environment variable (or the equivalent runtime library path environment
+    variable for your system). The ICU libraries may not link or load properly
+    without doing this.</p>
+
+    <p>Note that if you do not want to have to set this variable, you may instead
+    use the --enable-rpath option at configuration time. This option will
+    instruct the linker to always look for the libraries where they are
+    installed. You will need to use the appropriate linker options when linking
+    your own applications and libraries against ICU, too. Please refer to your
+    system's linker manual for information about runtime paths. The use of rpath
+    also means that when building a new version of ICU you should not have an
+    older version installed in the same place as the new version's installation
+    directory, as the older libraries will used during the build, instead of the
+    new ones, likely leading to an incorrectly build ICU. This is the proper
+    behavior of rpath.</p>
+
+    <h2><a name="PlatformDependencies" href="#PlatformDependencies" id=
+    "PlatformDependencies">Platform Dependencies</a></h2>
+
+    <h3><a name="PlatformDependenciesNew" href="#PlatformDependenciesNew" id=
+    "PlatformDependenciesNew">Porting To A New Platform</a></h3>
+
+    <p>If you are using ICU's Makefiles to build ICU on a new platform, there are
+    a few places where you will need to add or modify some files. If you need
+    more help, you can always ask the <a href=
+    "http://www.icu-project.org/contacts.html">icu-support mailing list</a>. Once
+    you have finished porting ICU to a new platform, it is recommended that you
+    contribute your changes back to ICU via the icu-support mailing list. This
+    will make it easier for everyone to benefit from your work.</p>
+
+    <h4>Data For a New Platform</h4>
+
+    <p>For some people, it may not be necessary for completely build ICU. Most of
+    the makefiles and build targets are for tools that are used for building
+    ICU's data, and an application's data (when an application uses ICU resource
+    bundles for its data).</p>
+
+    <p>Data files can be built on a different platform when both platforms share
+    the same endianness and the same charset family. This assertion does not
+    include platform dependent DLLs/shared/static libraries. For details see the
+    User Guide <a href="http://www.icu-project.org/userguide/icudata.html">ICU
+    Data</a> chapter.</p>
+
+    <p>ICU 3.6 removes the requirement that ICU be completely built in the native
+    operating environment. It adds the icupkg tool which can be run on any
+    platform to turn binary ICU data files from any one of the three formats into
+    any one of the other data formats. This allows a application to use ICU data
+    built anywhere to be used for any other target platform.</p>
+
+    <p><strong>WARNING!</strong> Building ICU without running the tests is not
+    recommended. The tests verify that ICU is safe to use. It is recommended that
+    you try to completely port and test ICU before using the libraries for your
+    own application.</p>
+
+    <h4>Adapting Makefiles For a New Platform</h4>
+
+    <p>Try to follow the build steps from the <a href="#HowToBuildUNIX">UNIX</a>
+    build instructions. If the configure script fails, then you will need to
+    modify some files. Here are the usual steps for porting to a new
+    platform:<br />
+    </p>
+
+    <ol>
+      <li>Create an mh file in icu/source/config/. You can use mh-linux or a
+      similar mh file as your base configuration.</li>
+
+      <li>Modify icu/source/aclocal.m4 to recognize your platform's mh file.</li>
+
+      <li>Modify icu/source/configure.in to properly set your <b>platform</b> C
+      Macro define.</li>
+
+      <li>Run <a href="http://www.gnu.org/software/autoconf/">autoconf</a> in
+      icu/source/ without any options. The autoconf tool is standard on most
+      Linux systems.</li>
+
+      <li>If you have any optimization options that you want to normally use, you
+      can modify icu/source/runConfigureICU to specify those options for your
+      platform.</li>
+
+      <li>Build and test ICU on your platform. It is very important that you run
+      the tests. If you don't run the tests, there is no guarentee that you have
+      properly ported ICU.</li>
+    </ol>
+
+    <h3><a name="PlatformDependenciesImpl" href="#PlatformDependenciesImpl" id=
+    "PlatformDependenciesImpl">Platform Dependent Implementations</a></h3>
+
+    <p>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.</p>
+
+    <ul>
+      <li>
+        <strong>unicode/platform.h.in</strong> (autoconf'ed platforms)<br />
+         <strong>unicode/p<i>XXXX</i>.h</strong> (others: pwin32.h, ppalmos.h,
+        ..): Platform-dependent typedefs and defines:<br />
+        <br />
+         
+
+        <ul>
+          <li>Generic types like UBool, int8_t, int16_t, int32_t, int64_t,
+          uint64_t etc.</li>
+
+          <li>U_EXPORT and U_IMPORT for specifying dynamic library import and
+          export</li>
+
+          <li>&lt;iostream&gt; usability</li>
+
+          <li>Thread safety usability</li>
+        </ul>
+        <br />
+      </li>
+
+      <li>
+        <strong>unicode/putil.h, putil.c</strong>: platform-dependent
+        implementations of various functions that are platform dependent:<br />
+        <br />
+         
+
+        <ul>
+          <li>uprv_isNaN, uprv_isInfinite, uprv_getNaN and uprv_getInfinity for
+          handling special floating point values.</li>
+
+          <li>uprv_tzset, uprv_timezone, uprv_tzname and time for getting
+          platform specific time and time zone information.</li>
+
+          <li>u_getDataDirectory for getting the default data directory.</li>
+
+          <li>uprv_getDefaultLocaleID for getting the default locale
+          setting.</li>
+
+          <li>uprv_getDefaultCodepage for getting the default codepage
+          encoding.</li>
+        </ul>
+        <br />
+      </li>
+
+      <li>
+        <strong>umutex.h, umutex.c</strong>: Code for doing synchronization in
+        multithreaded applications. If you wish to use International Components
+        for Unicode in a multithreaded application, you must provide a
+        synchronization primitive that the classes can use to protect their
+        global data against simultaneous modifications. We already supply working
+        implementations for many platforms that ICU builds on.<br />
+        <br />
+      </li>
+
+      <li><strong>umapfile.h, umapfile.c</strong>: functions for mapping or
+      otherwise reading or loading files into memory. All access by ICU to data
+      from files makes use of these functions.<br />
+      <br />
+      </li>
+
+      <li>Using platform specific #ifdef macros are highly discouraged outside of
+      the scope of these files. When the source code gets updated in the future,
+      these #ifdef's can cause testing problems for your platform.</li>
+    </ul>
+    <hr />
+
+    <p>Copyright &copy; 1997-2007 International Business Machines Corporation and
+    others. All Rights Reserved.<br />
+     IBM Globalization Center of Competency - San Jos&eacute;<br />
+     4400 North First Street<br />
+     San Jos&eacute;, CA 95134<br />
+     USA</p>
+  </body>
+</html>
+
diff --git a/source/Doxyfile.in b/source/Doxyfile.in
new file mode 100644
index 0000000..d1acc94
--- /dev/null
+++ b/source/Doxyfile.in
@@ -0,0 +1,224 @@
+# Doxyfile 1.3.7
+#  ********************************************************************
+#  * COPYRIGHT:
+#  * Copyright (c) 2004-2007, International Business Machines Corporation
+#  * and others. All Rights Reserved.
+#  ********************************************************************
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = "ICU @VERSION@"
+PROJECT_NUMBER         = 
+OUTPUT_DIRECTORY       = doc
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = YES
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = 
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = NO
+STRIP_FROM_PATH        = 
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = YES
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+DISTRIBUTE_GROUP_DOC   = NO
+TAB_SIZE               = 8
+ALIASES                = "memo=\par Note:\n" \
+                         "draft=\xrefitem draft \"Draft\" \"Draft List\"  This API may be changed in the future versions and was introduced in" \
+                         "stable=\xrefitem stable \"Stable\" \"Stable List\"" \
+                         "deprecated=\xrefitem deprecated \"Deprecated\" \"Deprecated List\"" \
+                         "obsolete=\xrefitem obsolete \"Obsolete\" \"Obsolete List\"" \
+                         "system=\xrefitem system \"System\" \"System List\" \n Do not use unless you know what you are doing." \
+                         "internal=\xrefitem internal \"Internal\"  \"Internal List\"  Do not use. This API is for interal use only." 
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+OPTIMIZE_OUTPUT_JAVA   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = NO
+EXTRACT_PRIVATE        = NO
+EXTRACT_STATIC         = NO
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = YES
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = ./common/unicode/platform.h @srcdir@/common/unicode @srcdir@/i18n/unicode @srcdir@/io/unicode @srcdir@/layout/LEFontInstance.h @srcdir@/layout/LEGlyphStorage.h @srcdir@/layout/LELanguages.h @srcdir@/layout/LEScripts.h @srcdir@/layout/LESwaps.h @srcdir@/layout/LETypes.h @srcdir@/layout/LayoutEngine.h @srcdir@/layoutex/layout
+FILE_PATTERNS          = *.h
+RECURSIVE              = NO
+EXCLUDE                = @srcdir@/common/unicode/urename.h @srcdir@/common/unicode/udraft.h @srcdir@/common/unicode/udeprctd.h @srcdir@/common/unicode/uobslete.h @srcdir@/common/unicode/ppalmos.h  
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = config*.h
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = 
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = YES
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = YES
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = NO
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = NO
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO 
+PERLMOD_LATEX          = YES
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = YES
+EXPAND_ONLY_PREDEF     = YES
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = U_EXPORT2 U_STABLE U_DRAFT U_INTERNAL U_SYSTEM U_DEPRECATED U_OBSOLETE
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       =  "@srcdir@/doc/html/icudocs.tag"
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = NO
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+GRAPHICAL_HIERARCHY    = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 0
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = YES
diff --git a/source/Makefile.in b/source/Makefile.in
new file mode 100644
index 0000000..b856a5c
--- /dev/null
+++ b/source/Makefile.in
@@ -0,0 +1,209 @@
+#******************************************************************************
+#
+#   Copyright (C) 1998-2007, International Business Machines
+#   Corporation and others.  All Rights Reserved.
+#
+#******************************************************************************
+## Top-level Makefile.in for ICU
+## Stephen F. Booth
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = .
+
+include $(top_builddir)/icudefs.mk
+
+docdir = $(datadir)/doc
+docsubdir = $(PACKAGE)$(ICULIBDASHSUFFIX)/html
+
+##
+
+## Build directory information
+subdir = .
+
+#AUTOCONF = @AUTOCONF@
+
+## Optional directory setup
+@LAYOUT_TRUE@LAYOUT = layout layoutex
+@ICUIO_TRUE@ICUIO = io
+@EXTRAS_TRUE@EXTRA = extra
+@TESTS_TRUE@TEST = test
+@SAMPLES_TRUE@SAMPLE = samples
+
+DOXYGEN = @DOXYGEN@
+
+## Files to remove for 'make clean'
+CLEANFILES = *~ 
+
+## Files built (autoconfed) and installed
+INSTALLED_BUILT_FILES = $(top_builddir)/config/Makefile.inc $(top_builddir)/config/icu-config @platform_make_fragment@ $(EXTRA_DATA:%=$(DESTDIR)$(pkglibdir)/%)
+
+## Files built (autoconfed) but not installed
+LOCAL_BUILT_FILES = icudefs.mk
+
+DOCDIRS = common i18n
+SUBDIRS =  stubdata common i18n $(LAYOUT) tools data $(ICUIO) $(EXTRA) $(SAMPLE) $(TEST)
+
+SECTION = 1
+
+MANX_FILES = config/icu-config.$(SECTION)
+
+ALL_MAN_FILES = $(MANX_FILES)
+
+## Extra files to install [nothing at present]
+EXTRA_DATA =
+
+## List of phony targets
+.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls		\
+install-recursive clean clean-local clean-recursive distclean		\
+distclean-local distclean-recursive doc dist dist-local dist-recursive	\
+check check-local check-recursive clean-recursive-with-twist install-icu \
+doc install-doc tests
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local all-recursive
+install: install-recursive install-local
+clean: clean-recursive-with-twist clean-local
+distclean : distclean-recursive distclean-local
+dist: dist-recursive dist-local
+check: all check-recursive check-local
+check-recursive: all
+
+ifeq ($(DOXYGEN),)
+doc:
+	@echo you need Doxygen to generate documentation. Doxygen can be found on the Web
+	@echo at http://www.doxygen.org/
+else
+doc: doc/html/index.html
+
+doc/html/index.html: Doxyfile $(wildcard ./common/unicode/platform.h $(srcdir)/common/unicode/*.h $(srcdir)/i18n/unicode/*.h $(srcdir)/layout/unicode/*.h $(srcdir)/io/unicode/*.h)
+	$(DOXYGEN)
+
+Doxyfile: $(srcdir)/Doxyfile.in
+	CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+endif
+
+LOCAL_SUBDIRS = $(SUBDIRS)
+CLEAN_FIRST_SUBDIRS = tools
+
+$(LIBDIR) $(BINDIR):
+	-$(MKINSTALLDIRS) $@
+
+## Recursive targets
+all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive: $(LIBDIR) $(BINDIR)
+	@dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(LOCAL_SUBDIRS)'; for subdir in $$list; do \
+	  echo "$(MAKE)[$(MAKELEVEL)]: Making \`$$target' in \`$$subdir'"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-local"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) RECURSIVE=YES $$local_target) || exit; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) "$$target-local" || exit; \
+	fi
+
+clean-recursive-with-twist:
+	$(MAKE) clean-recursive LOCAL_SUBDIRS='$(CLEAN_FIRST_SUBDIRS) $(filter-out $(CLEAN_FIRST_SUBDIRS),$(LOCAL_SUBDIRS))'
+
+all-local: $(srcdir)/configure $(LOCAL_BUILT_FILES) $(INSTALLED_BUILT_FILES)
+
+install-local: install-icu install-manx
+
+install-icu: $(INSTALLED_BUILT_FILES)
+	@$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/config
+	@$(MKINSTALLDIRS) $(DESTDIR)$(pkglibdir)
+	@$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
+	@$(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
+	$(INSTALL_DATA) @platform_make_fragment@ $(DESTDIR)$(pkgdatadir)/config/@platform_make_fragment_name@
+	$(INSTALL_SCRIPT) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(pkgdatadir)/mkinstalldirs
+	$(INSTALL_DATA) $(top_srcdir)/../license.html $(DESTDIR)$(pkgdatadir)/license.html
+	$(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config
+	$(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc
+	cd $(DESTDIR)$(pkglibdir)/..; \
+	    $(RM) current && ln -s $(VERSION) current; \
+	    $(RM) Makefile.inc && ln -s current/Makefile.inc Makefile.inc
+
+ifeq ($(DOXYGEN),)
+install-doc:
+else
+install-doc: doc
+	$(RM) -r $(DESTDIR)$(docdir)/$(docsubdir)
+	$(MKINSTALLDIRS) $(DESTDIR)$(docdir)/$(docsubdir)
+	$(INSTALL_DATA) doc/html/* $(DESTDIR)$(docdir)/$(docsubdir)
+endif
+
+$(DESTDIR)$(pkglibdir)/%: $(top_srcdir)/../data/%
+	$(INSTALL_DATA) $< $@
+
+# Build the tests, but don't run them.
+tests: all
+	$(MAKE) -C $(top_builddir)/test
+
+dist-local:
+
+clean-local:
+	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+	$(RMV) Doxyfile doc
+
+distclean-local: clean-local
+	$(RMV) $(top_builddir)/config/Makefile.inc $(top_builddir)/config/icu-config
+	$(RMV) config.cache config.log config.status
+	$(RMV) Makefile config/Makefile icudefs.mk $(LIBDIR) $(BINDIR)
+
+check-local:
+
+#$(srcdir)/configure : $(srcdir)/configure.in $(top_srcdir)/aclocal.m4
+#	cd $(srcdir) && $(AUTOCONF)
+
+icudefs.mk: $(srcdir)/icudefs.mk.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+		&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+Makefile: $(srcdir)/Makefile.in icudefs.mk $(top_builddir)/config.status
+	cd $(top_builddir) \
+		&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(top_builddir)/config/Makefile.inc: $(srcdir)/config/Makefile.inc.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+		&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(top_builddir)/config/icu-config: $(top_builddir)/Makefile $(top_srcdir)/config/icu-config-top $(top_srcdir)/config/icu-config-bottom $(top_builddir)/config/Makefile.inc @platform_make_fragment@ $(top_srcdir)/config/make2sh.sed
+	-$(RMV) $@
+	$(INSTALL_SCRIPT) $(top_srcdir)/config/icu-config-top $@
+	chmod u+w $@
+	@echo "# Following from @platform_make_fragment@" >> $@
+	sed -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@
+	sed -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@
+	cat $(top_srcdir)/config/icu-config-bottom >> $@
+	echo "# Rebuilt on "`date` >> $@
+	chmod u-w $@
+
+config.status: $(srcdir)/configure $(srcdir)/common/unicode/uversion.h
+	@echo
+	@echo
+	@echo "*** config.status has become stale ***"
+	@echo "   'configure' and/or 'uversion.h' have changed, please"
+	@echo "  do 'runConfigureICU' (or 'configure') again, as per"
+	@echo "  the readme.html."
+	@echo
+	@echo
+	exit 1
+
+
+install-manx: $(MANX_FILES)
+	$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
+	$(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
+
+config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
+	cd $(top_builddir) \
+	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
diff --git a/source/aclocal.m4 b/source/aclocal.m4
new file mode 100644
index 0000000..87ba367
--- /dev/null
+++ b/source/aclocal.m4
@@ -0,0 +1,339 @@
+dnl aclocal.m4 for ICU
+dnl Copyright (c) 1999-2007, International Business Machines Corporation and
+dnl others. All Rights Reserved.
+dnl Stephen F. Booth
+
+dnl @TOP@
+
+dnl ICU_CHECK_MH_FRAG
+AC_DEFUN(ICU_CHECK_MH_FRAG, [
+	AC_CACHE_CHECK(
+		[which Makefile fragment to use],
+		[icu_cv_host_frag],
+		[
+case "${host}" in
+*-*-solaris*)
+	if test "$GCC" = yes; then	
+		icu_cv_host_frag=mh-solaris-gcc
+	else
+		icu_cv_host_frag=mh-solaris
+	fi ;;
+alpha*-*-linux-gnu)
+	if test "$GCC" = yes; then
+		icu_cv_host_frag=mh-alpha-linux-gcc
+	else
+		icu_cv_host_frag=mh-alpha-linux-cc
+	fi ;;
+powerpc*-*-linux*)
+	if test "$GCC" = yes; then
+		icu_cv_host_frag=mh-linux
+	else
+		icu_cv_host_frag=mh-linux-va
+	fi ;;
+*-*-linux*|*-pc-gnu) icu_cv_host_frag=mh-linux ;;
+*-*-cygwin|*-*-mingw32)
+	if test "$GCC" = yes; then
+		AC_TRY_COMPILE([
+#ifndef __MINGW32__
+#error This is not MinGW
+#endif], [], icu_cv_host_frag=mh-mingw, icu_cv_host_frag=mh-cygwin)
+	else
+		icu_cv_host_frag=mh-cygwin-msvc
+	fi ;;
+*-*-*bsd*|*-*-dragonfly*) 	icu_cv_host_frag=mh-bsd-gcc ;;
+*-*-aix*)
+	if test "$GCC" = yes; then
+		icu_cv_host_frag=mh-aix-gcc
+	else
+		icu_cv_host_frag=mh-aix-va
+	fi ;;
+*-*-hpux*)
+	if test "$GCC" = yes; then
+		icu_cv_host_frag=mh-hpux-gcc
+	else
+		case "$CXX" in
+		*aCC)    icu_cv_host_frag=mh-hpux-acc ;;
+		esac
+	fi ;;
+*-*ibm-openedition*|*-*-os390*)	icu_cv_host_frag=mh-os390 ;;
+*-*-os400*)	icu_cv_host_frag=mh-os400 ;;
+*-apple-rhapsody*)	icu_cv_host_frag=mh-darwin ;;
+*-apple-darwin*)	icu_cv_host_frag=mh-darwin ;;
+*-*-beos)	icu_cv_host_frag=mh-beos ;;
+*-*-irix*)	icu_cv_host_frag=mh-irix ;;
+*-dec-osf*) icu_cv_host_frag=mh-alpha-osf ;;
+*-*-nto*)	icu_cv_host_frag=mh-qnx ;;
+*-ncr-*)	icu_cv_host_frag=mh-mpras ;;
+*) 		icu_cv_host_frag=mh-unknown ;;
+esac
+		]
+	)
+])
+
+dnl ICU_CONDITIONAL - similar example taken from Automake 1.4
+AC_DEFUN(ICU_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+if $2; then
+  $1_TRUE=
+else
+  $1_TRUE='#'
+fi])
+
+dnl ICU_PROG_LINK - Make sure that the linker is usable
+AC_DEFUN(ICU_PROG_LINK,
+[
+case "${host}" in
+    *-*-cygwin*|*-*-mingw*)
+        if test "$GCC" != yes && test -n "`link --version 2>&1 | grep 'GNU coreutils'`"; then
+            AC_MSG_ERROR([link.exe is not a valid linker. Your PATH is incorrect.
+                  Please follow the directions in ICU's readme.])
+        fi;;
+    *);;
+esac])
+
+dnl AC_SEARCH_LIBS_FIRST(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND
+dnl            [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
+dnl Search for a library defining FUNC, then see if it's not already available.
+
+AC_DEFUN(AC_SEARCH_LIBS_FIRST,
+[AC_PREREQ([2.13])
+AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
+[ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_$1="no"
+for i in $2; do
+LIBS="-l$i $5 $ac_func_search_save_LIBS"
+AC_TRY_LINK_FUNC([$1],
+[ac_cv_search_$1="-l$i"
+break])
+done
+if test "$ac_cv_search_$1" = "no"; then
+AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
+fi
+LIBS="$ac_func_search_save_LIBS"])
+if test "$ac_cv_search_$1" != "no"; then
+  test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
+  $3
+else :
+  $4
+fi])
+
+dnl Check if we can build and use 64-bit libraries
+AC_DEFUN(AC_CHECK_64BIT_LIBS,
+[
+    AC_ARG_ENABLE(64bit-libs,
+        [  --enable-64bit-libs     build 64-bit libraries [default=yes]],
+        [ENABLE_64BIT_LIBS=${enableval}],
+        [ENABLE_64BIT_LIBS=yes]
+    )
+    dnl These results can't be cached because is sets compiler flags.
+    AC_MSG_CHECKING([for 64-bit executable support])
+    if test "$ENABLE_64BIT_LIBS" != no; then
+        if test "$GCC" = yes; then
+            dnl First we check that gcc already compiles as 64-bit
+            if test -n "`$CXX -dumpspecs 2>&1 && $CC -dumpspecs 2>&1 | grep -v __LP64__`"; then
+                ENABLE_64BIT_LIBS=yes
+            else
+                dnl Now we check a little more forcefully.
+                dnl Maybe the compiler builds as 32-bit on a 64-bit machine.
+                OLD_CFLAGS="${CFLAGS}"
+                OLD_CXXFLAGS="${CXXFLAGS}"
+                CFLAGS="${CFLAGS} -m64"
+                CXXFLAGS="${CXXFLAGS} -m64"
+                AC_TRY_RUN(int main(void) {return 0;},
+                   ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
+                if test "$ENABLE_64BIT_LIBS" = no; then
+                    # Nope. We're on a 32-bit machine with a 32-bit compiler.
+                    CFLAGS="${OLD_CFLAGS}"
+                    CXXFLAGS="${OLD_CXXFLAGS}"
+                fi
+            fi
+        else
+            case "${host}" in
+            sparc*-*-solaris*)
+                SPARCV9=`isainfo -n 2>&1 | grep sparcv9`
+                SOL64=`$CXX -xarch=v9 2>&1 && $CC -xarch=v9 2>&1 | grep -v usage:`
+                if test -z "$SOL64" && test -n "$SPARCV9"; then
+                    CFLAGS="${CFLAGS} -xtarget=ultra -xarch=v9"
+                    CXXFLAGS="${CXXFLAGS} -xtarget=ultra -xarch=v9"
+                    LDFLAGS="${LDFLAGS} -xtarget=ultra -xarch=v9"
+                    ENABLE_64BIT_LIBS=yes
+                else
+                    ENABLE_64BIT_LIBS=no
+                fi
+                ;;
+            i386-*-solaris*)
+                AMD64=`isainfo -n 2>&1 | grep amd64`
+                # The new compiler option
+                SOL64=`$CXX -m64 2>&1 && $CC -m64 2>&1 | grep -v usage:`
+                if test -z "$SOL64" && test -n "$AMD64"; then
+                    CFLAGS="${CFLAGS} -m64"
+                    CXXFLAGS="${CXXFLAGS} -m64"
+                    ENABLE_64BIT_LIBS=yes
+                else
+                    # The older compiler option
+                    SOL64=`$CXX -xtarget=generic64 2>&1 && $CC -xtarget=generic64 2>&1 | grep -v usage:`
+                    if test -z "$SOL64" && test -n "$AMD64"; then
+                        CFLAGS="${CFLAGS} -xtarget=generic64"
+                        CXXFLAGS="${CXXFLAGS} -xtarget=generic64"
+                        ENABLE_64BIT_LIBS=yes
+                    else
+                        ENABLE_64BIT_LIBS=no
+                    fi
+                fi
+                ;;
+            ia64-*-linux*)
+                # check for ecc/ecpc compiler support
+                if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Intel`"; then
+                    if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Itanium`"; then
+                        ENABLE_64BIT_LIBS=yes
+                    else
+                        ENABLE_64BIT_LIBS=no
+                    fi
+                else
+                    # unknown
+                    ENABLE_64BIT_LIBS=no
+                fi
+                ;;
+            *-*-cygwin)
+                dnl vcvarsamd64.bat should have been used to enable 64-bit builds.
+                dnl We only do this check to display the correct answer.
+                if test -n "`$CXX -help 2>&1 | grep 'for x64'`"; then
+                    ENABLE_64BIT_LIBS=yes
+                else
+                    # unknown
+                    ENABLE_64BIT_LIBS=no
+                fi
+                ;;
+            *-*-aix*|powerpc64-*-linux*)
+                OLD_CFLAGS="${CFLAGS}"
+                OLD_CXXFLAGS="${CXXFLAGS}"
+                OLD_LDFLAGS="${LDFLAGS}"
+                CFLAGS="${CFLAGS} -q64"
+                CXXFLAGS="${CXXFLAGS} -q64"
+                LDFLAGS="${LDFLAGS} -q64"
+                AC_TRY_RUN(int main(void) {return 0;},
+                   ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
+                if test "$ENABLE_64BIT_LIBS" = no; then
+                    CFLAGS="${OLD_CFLAGS}"
+                    CXXFLAGS="${OLD_CXXFLAGS}"
+                    LDFLAGS="${OLD_LDFLAGS}"
+                else
+                    case "${host}" in
+                    *-*-aix*)
+                        ARFLAGS="${ARFLAGS} -X64"
+                    esac
+                fi
+                ;;
+            *-*-hpux*)
+                dnl First we try the newer +DD64, if that doesn't work,
+                dnl try other options.
+
+                OLD_CFLAGS="${CFLAGS}"
+                OLD_CXXFLAGS="${CXXFLAGS}"
+                CFLAGS="${CFLAGS} +DD64"
+                CXXFLAGS="${CXXFLAGS} +DD64"
+                AC_TRY_RUN(int main(void) {return 0;},
+                    ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
+                if test "$ENABLE_64BIT_LIBS" = no; then
+                    CFLAGS="${OLD_CFLAGS}"
+                    CXXFLAGS="${OLD_CXXFLAGS}"
+                    CFLAGS="${CFLAGS} +DA2.0W"
+                    CXXFLAGS="${CXXFLAGS} +DA2.0W"
+                    AC_TRY_RUN(int main(void) {return 0;},
+                        ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
+                    if test "$ENABLE_64BIT_LIBS" = no; then
+                        CFLAGS="${OLD_CFLAGS}"
+                        CXXFLAGS="${OLD_CXXFLAGS}"
+                    fi
+                fi
+                ;;
+            *-*ibm-openedition*|*-*-os390*)
+                OLD_CFLAGS="${CFLAGS}"
+                OLD_CXXFLAGS="${CXXFLAGS}"
+                OLD_LDFLAGS="${LDFLAGS}"
+                CFLAGS="${CFLAGS} -Wc,lp64"
+                CXXFLAGS="${CXXFLAGS} -Wc,lp64"
+                LDFLAGS="${LDFLAGS} -Wl,lp64"
+                AC_TRY_RUN(int main(void) {return 0;},
+                   ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
+                if test "$ENABLE_64BIT_LIBS" = no; then
+                    CFLAGS="${OLD_CFLAGS}"
+                    CXXFLAGS="${OLD_CXXFLAGS}"
+                    LDFLAGS="${OLD_LDFLAGS}"
+                fi
+                ;;
+            *)
+                ENABLE_64BIT_LIBS=no
+                ;;
+            esac
+        fi
+    else
+        if test "$GCC" = yes; then
+            OLD_CFLAGS="${CFLAGS}"
+            OLD_CXXFLAGS="${CXXFLAGS}"
+            CFLAGS="${CFLAGS} -m32"
+            CXXFLAGS="${CXXFLAGS} -m32"
+            AC_TRY_RUN(int main(void) {return 0;},
+               ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=yes)
+            if test "$ENABLE_64BIT_LIBS" = yes; then
+                CFLAGS="${OLD_CFLAGS}"
+                CXXFLAGS="${OLD_CXXFLAGS}"
+            fi
+        fi
+    fi
+    dnl Individual tests that fail should reset their own flags.
+    AC_MSG_RESULT($ENABLE_64BIT_LIBS)
+])
+
+dnl Strict compilation options.
+AC_DEFUN(AC_CHECK_STRICT_COMPILE,
+[
+    AC_MSG_CHECKING([whether strict compiling is on])
+    AC_ARG_ENABLE(strict,[  --enable-strict         compile with strict compiler options [default=no]], [
+        if test "$enableval" = no
+        then
+            ac_use_strict_options=no
+        else
+            ac_use_strict_options=yes
+        fi
+      ], [ac_use_strict_options=no])
+    AC_MSG_RESULT($ac_use_strict_options)
+
+    if test "$ac_use_strict_options" = yes
+    then
+        if test "$GCC" = yes
+        then
+            CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long"
+            case "${host}" in
+            *-*-solaris*)
+                CFLAGS="$CFLAGS -D__STDC__=0";;
+            esac
+        else
+            case "${host}" in
+            *-*-cygwin)
+                if test "`$CC /help 2>&1 | head -c9`" = "Microsoft"
+                then
+                    CFLAGS="$CFLAGS /W4"
+                fi
+            esac
+        fi
+        if test "$GXX" = yes
+        then
+            CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
+            case "${host}" in
+            *-*-solaris*)
+                CXXFLAGS="$CXXFLAGS -D__STDC__=0";;
+            esac
+        else
+            case "${host}" in
+            *-*-cygwin)
+                if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
+                then
+                    CXXFLAGS="$CXXFLAGS /W4"
+                fi
+            esac
+        fi
+    fi
+])
+
+
diff --git a/source/allinone/allinone.sln b/source/allinone/allinone.sln
new file mode 100644
index 0000000..1fa85af
--- /dev/null
+++ b/source/allinone/allinone.sln
@@ -0,0 +1,394 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cintltst", "..\test\cintltst\cintltst.vcproj", "{3D1246AE-1B32-479B-BECA-AEFA97BE2321}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47} = {ECA6B435-B4FA-4F9F-BF95-F451D078FC47}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "..\common\common.vcproj", "{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}"
+	ProjectSection(ProjectDependencies) = postProject
+		{203EC78A-0531-43F0-A636-285439BDE025} = {203EC78A-0531-43F0-A636-285439BDE025}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctestfw", "..\tools\ctestfw\ctestfw.vcproj", "{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "derb", "..\tools\genrb\derb.vcproj", "{D3065ADB-8820-4CC7-9B6C-9510833961A3}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genbrk", "..\tools\genbrk\genbrk.vcproj", "{C2BE5000-7501-4E87-9724-B8D82494FAE6}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genccode", "..\tools\genccode\genccode.vcproj", "{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencmn", "..\tools\gencmn\gencmn.vcproj", "{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencnval", "..\tools\gencnval\gencnval.vcproj", "{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gennames", "..\tools\gennames\gennames.vcproj", "{F5281B04-A9E0-4680-BBA8-1D7F7D115458}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gennorm", "..\tools\gennorm\gennorm.vcproj", "{F5213103-6CBE-46E6-B4CC-2570B6837D86}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genpname", "..\tools\genpname\genpname.vcproj", "{DBC0AF0B-B9FF-4B23-905B-4D4CDC2A91CB}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genprops", "..\tools\genprops\genprops.vcproj", "{6F744648-D15F-478A-90C6-58E353B5DDB3}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrb", "..\tools\genrb\genrb.vcproj", "{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gentest", "..\tools\gentest\gentest.vcproj", "{77C78066-746F-4EA6-B3FE-B8C8A4A97891}"
+	ProjectSection(ProjectDependencies) = postProject
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47} = {ECA6B435-B4FA-4F9F-BF95-F451D078FC47}
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genuca", "..\tools\genuca\genuca.vcproj", "{86829694-A375-4C58-B4EA-96EF514E3225}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "i18n", "..\i18n\i18n.vcproj", "{0178B127-6269-407D-B112-93877BB62776}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intltest", "..\test\intltest\intltest.vcproj", "{73632960-B3A6-464D-83A3-4B43365F19B8}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47} = {ECA6B435-B4FA-4F9F-BF95-F451D078FC47}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "layout", "..\layout\layout.vcproj", "{C920062A-0647-4553-A3B2-37C58065664B}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "layoutex", "..\layoutex\layoutex.vcproj", "{37FC2C7F-1904-4811-8955-2F478830EAD1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{C920062A-0647-4553-A3B2-37C58065664B} = {C920062A-0647-4553-A3B2-37C58065664B}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makeconv", "..\tools\makeconv\makeconv.vcproj", "{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makedata", "..\data\makedata.vcproj", "{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}"
+	ProjectSection(ProjectDependencies) = postProject
+		{4C8454FE-81D3-4CA3-9927-29BA96F03DAC} = {4C8454FE-81D3-4CA3-9927-29BA96F03DAC}
+		{9D4211F7-2C77-439C-82F0-30A4E43BA569} = {9D4211F7-2C77-439C-82F0-30A4E43BA569}
+		{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547} = {FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}
+		{D3065ADB-8820-4CC7-9B6C-9510833961A3} = {D3065ADB-8820-4CC7-9B6C-9510833961A3}
+		{631C23CE-6C1D-4875-88F0-85E0A42B36EA} = {631C23CE-6C1D-4875-88F0-85E0A42B36EA}
+		{3D1246AE-1B32-479B-BECA-AEFA97BE2321} = {3D1246AE-1B32-479B-BECA-AEFA97BE2321}
+		{86829694-A375-4C58-B4EA-96EF514E3225} = {86829694-A375-4C58-B4EA-96EF514E3225}
+		{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F} = {A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}
+		{DBA4088D-F6F9-4F8F-8820-082A4765C16C} = {DBA4088D-F6F9-4F8F-8820-082A4765C16C}
+		{203EC78A-0531-43F0-A636-285439BDE025} = {203EC78A-0531-43F0-A636-285439BDE025}
+		{67351485-4D18-4245-BE39-A7EF0675ACD2} = {67351485-4D18-4245-BE39-A7EF0675ACD2}
+		{E4993E82-D68A-46CA-BAE0-9D35E172E46F} = {E4993E82-D68A-46CA-BAE0-9D35E172E46F}
+		{37FC2C7F-1904-4811-8955-2F478830EAD1} = {37FC2C7F-1904-4811-8955-2F478830EAD1}
+		{77C78066-746F-4EA6-B3FE-B8C8A4A97891} = {77C78066-746F-4EA6-B3FE-B8C8A4A97891}
+		{73632960-B3A6-464D-83A3-4B43365F19B8} = {73632960-B3A6-464D-83A3-4B43365F19B8}
+		{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC} = {62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF62} = {DB312A49-12A9-4E07-9E96-451DC2D8FF62}
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF61} = {DB312A49-12A9-4E07-9E96-451DC2D8FF61}
+		{6F744648-D15F-478A-90C6-58E353B5DDB3} = {6F744648-D15F-478A-90C6-58E353B5DDB3}
+		{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C} = {F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47} = {ECA6B435-B4FA-4F9F-BF95-F451D078FC47}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+		{8B41752B-5A52-41E4-B7E0-07921C0CC6BF} = {8B41752B-5A52-41E4-B7E0-07921C0CC6BF}
+		{39690C2A-AD89-45E4-893A-899496B85785} = {39690C2A-AD89-45E4-893A-899496B85785}
+		{C920062A-0647-4553-A3B2-37C58065664B} = {C920062A-0647-4553-A3B2-37C58065664B}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+		{DBC0AF0B-B9FF-4B23-905B-4D4CDC2A91CB} = {DBC0AF0B-B9FF-4B23-905B-4D4CDC2A91CB}
+		{C2B04507-2521-4801-BF0D-5FD79D6D518C} = {C2B04507-2521-4801-BF0D-5FD79D6D518C}
+		{97521D06-EC47-45D4-8BD0-9E16B3F93B2A} = {97521D06-EC47-45D4-8BD0-9E16B3F93B2A}
+		{F5281B04-A9E0-4680-BBA8-1D7F7D115458} = {F5281B04-A9E0-4680-BBA8-1D7F7D115458}
+		{F5213103-6CBE-46E6-B4CC-2570B6837D86} = {F5213103-6CBE-46E6-B4CC-2570B6837D86}
+		{C2BE5000-7501-4E87-9724-B8D82494FAE6} = {C2BE5000-7501-4E87-9724-B8D82494FAE6}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pkgdata", "..\tools\pkgdata\pkgdata.vcproj", "{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547} = {FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}
+		{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F} = {A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}
+		{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC} = {62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stubdata", "..\stubdata\stubdata.vcproj", "{203EC78A-0531-43F0-A636-285439BDE025}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "toolutil", "..\tools\toolutil\toolutil.vcproj", "{6B231032-3CB5-4EED-9210-810D666A23A0}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uconv", "..\extra\uconv\uconv.vcproj", "{DBA4088D-F6F9-4F8F-8820-082A4765C16C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{4C8454FE-81D3-4CA3-9927-29BA96F03DAC} = {4C8454FE-81D3-4CA3-9927-29BA96F03DAC}
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+		{97521D06-EC47-45D4-8BD0-9E16B3F93B2A} = {97521D06-EC47-45D4-8BD0-9E16B3F93B2A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "io", "..\io\io.vcproj", "{C2B04507-2521-4801-BF0D-5FD79D6D518C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gensprep", "..\tools\gensprep\gensprep.vcproj", "{631C23CE-6C1D-4875-88F0-85E0A42B36EA}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iotest", "..\test\iotest\iotest.vcproj", "{E4993E82-D68A-46CA-BAE0-9D35E172E46F}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47} = {ECA6B435-B4FA-4F9F-BF95-F451D078FC47}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+		{C2B04507-2521-4801-BF0D-5FD79D6D518C} = {C2B04507-2521-4801-BF0D-5FD79D6D518C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genbidi", "..\tools\genbidi\genbidi.vcproj", "{DB312A49-12A9-4E07-9E96-451DC2D8FF62}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencase", "..\tools\gencase\gencase.vcproj", "{DB312A49-12A9-4E07-9E96-451DC2D8FF61}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icupkg", "..\tools\icupkg\icupkg.vcproj", "{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genctd", "..\tools\genctd\genctd.vcproj", "{9D4211F7-2C77-439C-82F0-30A4E43BA569}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "letest", "..\test\letest\letest.vcproj", "{67351485-4D18-4245-BE39-A7EF0675ACD2}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47} = {ECA6B435-B4FA-4F9F-BF95-F451D078FC47}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+		{C920062A-0647-4553-A3B2-37C58065664B} = {C920062A-0647-4553-A3B2-37C58065664B}
+		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icuswap", "..\tools\icuswap\icuswap.vcproj", "{39690C2A-AD89-45E4-893A-899496B85785}"
+	ProjectSection(ProjectDependencies) = postProject
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
+		{6B231032-3CB5-4EED-9210-810D666A23A0} = {6B231032-3CB5-4EED-9210-810D666A23A0}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Debug|Win32.ActiveCfg = Debug|Win32
+		{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Debug|Win32.Build.0 = Debug|Win32
+		{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Release|Win32.ActiveCfg = Release|Win32
+		{3D1246AE-1B32-479B-BECA-AEFA97BE2321}.Release|Win32.Build.0 = Release|Win32
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Debug|Win32.ActiveCfg = Debug|Win32
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Debug|Win32.Build.0 = Debug|Win32
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Release|Win32.ActiveCfg = Release|Win32
+		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}.Release|Win32.Build.0 = Release|Win32
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Debug|Win32.ActiveCfg = Debug|Win32
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Debug|Win32.Build.0 = Debug|Win32
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Release|Win32.ActiveCfg = Release|Win32
+		{ECA6B435-B4FA-4F9F-BF95-F451D078FC47}.Release|Win32.Build.0 = Release|Win32
+		{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Debug|Win32.Build.0 = Debug|Win32
+		{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Release|Win32.ActiveCfg = Release|Win32
+		{D3065ADB-8820-4CC7-9B6C-9510833961A3}.Release|Win32.Build.0 = Release|Win32
+		{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Debug|Win32.Build.0 = Debug|Win32
+		{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Release|Win32.ActiveCfg = Release|Win32
+		{C2BE5000-7501-4E87-9724-B8D82494FAE6}.Release|Win32.Build.0 = Release|Win32
+		{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Debug|Win32.ActiveCfg = Debug|Win32
+		{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Debug|Win32.Build.0 = Debug|Win32
+		{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Release|Win32.ActiveCfg = Release|Win32
+		{FDD3C4F2-9805-44EB-9A77-BC1C1C95B547}.Release|Win32.Build.0 = Release|Win32
+		{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Debug|Win32.Build.0 = Debug|Win32
+		{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Release|Win32.ActiveCfg = Release|Win32
+		{A8D36F8D-09E6-4174-91C3-7BEAA9C3F04F}.Release|Win32.Build.0 = Release|Win32
+		{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Debug|Win32.Build.0 = Debug|Win32
+		{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Release|Win32.ActiveCfg = Release|Win32
+		{8B41752B-5A52-41E4-B7E0-07921C0CC6BF}.Release|Win32.Build.0 = Release|Win32
+		{F5281B04-A9E0-4680-BBA8-1D7F7D115458}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F5281B04-A9E0-4680-BBA8-1D7F7D115458}.Debug|Win32.Build.0 = Debug|Win32
+		{F5281B04-A9E0-4680-BBA8-1D7F7D115458}.Release|Win32.ActiveCfg = Release|Win32
+		{F5281B04-A9E0-4680-BBA8-1D7F7D115458}.Release|Win32.Build.0 = Release|Win32
+		{F5213103-6CBE-46E6-B4CC-2570B6837D86}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F5213103-6CBE-46E6-B4CC-2570B6837D86}.Debug|Win32.Build.0 = Debug|Win32
+		{F5213103-6CBE-46E6-B4CC-2570B6837D86}.Release|Win32.ActiveCfg = Release|Win32
+		{F5213103-6CBE-46E6-B4CC-2570B6837D86}.Release|Win32.Build.0 = Release|Win32
+		{DBC0AF0B-B9FF-4B23-905B-4D4CDC2A91CB}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DBC0AF0B-B9FF-4B23-905B-4D4CDC2A91CB}.Debug|Win32.Build.0 = Debug|Win32
+		{DBC0AF0B-B9FF-4B23-905B-4D4CDC2A91CB}.Release|Win32.ActiveCfg = Release|Win32
+		{DBC0AF0B-B9FF-4B23-905B-4D4CDC2A91CB}.Release|Win32.Build.0 = Release|Win32
+		{6F744648-D15F-478A-90C6-58E353B5DDB3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{6F744648-D15F-478A-90C6-58E353B5DDB3}.Debug|Win32.Build.0 = Debug|Win32
+		{6F744648-D15F-478A-90C6-58E353B5DDB3}.Release|Win32.ActiveCfg = Release|Win32
+		{6F744648-D15F-478A-90C6-58E353B5DDB3}.Release|Win32.Build.0 = Release|Win32
+		{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Debug|Win32.Build.0 = Debug|Win32
+		{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Release|Win32.ActiveCfg = Release|Win32
+		{97521D06-EC47-45D4-8BD0-9E16B3F93B2A}.Release|Win32.Build.0 = Release|Win32
+		{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Debug|Win32.ActiveCfg = Debug|Win32
+		{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Debug|Win32.Build.0 = Debug|Win32
+		{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Release|Win32.ActiveCfg = Release|Win32
+		{77C78066-746F-4EA6-B3FE-B8C8A4A97891}.Release|Win32.Build.0 = Release|Win32
+		{86829694-A375-4C58-B4EA-96EF514E3225}.Debug|Win32.ActiveCfg = Debug|Win32
+		{86829694-A375-4C58-B4EA-96EF514E3225}.Debug|Win32.Build.0 = Debug|Win32
+		{86829694-A375-4C58-B4EA-96EF514E3225}.Release|Win32.ActiveCfg = Release|Win32
+		{86829694-A375-4C58-B4EA-96EF514E3225}.Release|Win32.Build.0 = Release|Win32
+		{0178B127-6269-407D-B112-93877BB62776}.Debug|Win32.ActiveCfg = Debug|Win32
+		{0178B127-6269-407D-B112-93877BB62776}.Debug|Win32.Build.0 = Debug|Win32
+		{0178B127-6269-407D-B112-93877BB62776}.Release|Win32.ActiveCfg = Release|Win32
+		{0178B127-6269-407D-B112-93877BB62776}.Release|Win32.Build.0 = Release|Win32
+		{73632960-B3A6-464D-83A3-4B43365F19B8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{73632960-B3A6-464D-83A3-4B43365F19B8}.Debug|Win32.Build.0 = Debug|Win32
+		{73632960-B3A6-464D-83A3-4B43365F19B8}.Release|Win32.ActiveCfg = Release|Win32
+		{73632960-B3A6-464D-83A3-4B43365F19B8}.Release|Win32.Build.0 = Release|Win32
+		{C920062A-0647-4553-A3B2-37C58065664B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C920062A-0647-4553-A3B2-37C58065664B}.Debug|Win32.Build.0 = Debug|Win32
+		{C920062A-0647-4553-A3B2-37C58065664B}.Release|Win32.ActiveCfg = Release|Win32
+		{C920062A-0647-4553-A3B2-37C58065664B}.Release|Win32.Build.0 = Release|Win32
+		{37FC2C7F-1904-4811-8955-2F478830EAD1}.Debug|Win32.ActiveCfg = Debug|Win32
+		{37FC2C7F-1904-4811-8955-2F478830EAD1}.Debug|Win32.Build.0 = Debug|Win32
+		{37FC2C7F-1904-4811-8955-2F478830EAD1}.Release|Win32.ActiveCfg = Release|Win32
+		{37FC2C7F-1904-4811-8955-2F478830EAD1}.Release|Win32.Build.0 = Release|Win32
+		{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Debug|Win32.Build.0 = Debug|Win32
+		{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Release|Win32.ActiveCfg = Release|Win32
+		{F5AD9738-1A3D-4906-B9C4-A7D9CE33DC2C}.Release|Win32.Build.0 = Release|Win32
+		{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Debug|Win32.Build.0 = Debug|Win32
+		{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Release|Win32.ActiveCfg = Release|Win32
+		{D9DF7F2F-93B7-4810-B5CD-96F4F33C079B}.Release|Win32.Build.0 = Release|Win32
+		{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Debug|Win32.Build.0 = Debug|Win32
+		{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Release|Win32.ActiveCfg = Release|Win32
+		{4C8454FE-81D3-4CA3-9927-29BA96F03DAC}.Release|Win32.Build.0 = Release|Win32
+		{203EC78A-0531-43F0-A636-285439BDE025}.Debug|Win32.ActiveCfg = Debug|Win32
+		{203EC78A-0531-43F0-A636-285439BDE025}.Debug|Win32.Build.0 = Debug|Win32
+		{203EC78A-0531-43F0-A636-285439BDE025}.Release|Win32.ActiveCfg = Release|Win32
+		{203EC78A-0531-43F0-A636-285439BDE025}.Release|Win32.Build.0 = Release|Win32
+		{6B231032-3CB5-4EED-9210-810D666A23A0}.Debug|Win32.ActiveCfg = Debug|Win32
+		{6B231032-3CB5-4EED-9210-810D666A23A0}.Debug|Win32.Build.0 = Debug|Win32
+		{6B231032-3CB5-4EED-9210-810D666A23A0}.Release|Win32.ActiveCfg = Release|Win32
+		{6B231032-3CB5-4EED-9210-810D666A23A0}.Release|Win32.Build.0 = Release|Win32
+		{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Debug|Win32.Build.0 = Debug|Win32
+		{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Release|Win32.ActiveCfg = Release|Win32
+		{DBA4088D-F6F9-4F8F-8820-082A4765C16C}.Release|Win32.Build.0 = Release|Win32
+		{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Debug|Win32.Build.0 = Debug|Win32
+		{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Release|Win32.ActiveCfg = Release|Win32
+		{C2B04507-2521-4801-BF0D-5FD79D6D518C}.Release|Win32.Build.0 = Release|Win32
+		{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Debug|Win32.ActiveCfg = Debug|Win32
+		{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Debug|Win32.Build.0 = Debug|Win32
+		{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Release|Win32.ActiveCfg = Release|Win32
+		{631C23CE-6C1D-4875-88F0-85E0A42B36EA}.Release|Win32.Build.0 = Release|Win32
+		{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Debug|Win32.Build.0 = Debug|Win32
+		{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Release|Win32.ActiveCfg = Release|Win32
+		{E4993E82-D68A-46CA-BAE0-9D35E172E46F}.Release|Win32.Build.0 = Release|Win32
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF62}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF62}.Debug|Win32.Build.0 = Debug|Win32
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF62}.Release|Win32.ActiveCfg = Release|Win32
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF62}.Release|Win32.Build.0 = Release|Win32
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Debug|Win32.Build.0 = Debug|Win32
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Release|Win32.ActiveCfg = Release|Win32
+		{DB312A49-12A9-4E07-9E96-451DC2D8FF61}.Release|Win32.Build.0 = Release|Win32
+		{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Debug|Win32.ActiveCfg = Debug|Win32
+		{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Debug|Win32.Build.0 = Debug|Win32
+		{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Release|Win32.ActiveCfg = Release|Win32
+		{62D4B15D-7A90-4ECB-BA19-5E021D6A21BC}.Release|Win32.Build.0 = Release|Win32
+		{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Debug|Win32.Build.0 = Debug|Win32
+		{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|Win32.ActiveCfg = Release|Win32
+		{9D4211F7-2C77-439C-82F0-30A4E43BA569}.Release|Win32.Build.0 = Release|Win32
+		{67351485-4D18-4245-BE39-A7EF0675ACD2}.Debug|Win32.ActiveCfg = Debug|Win32
+		{67351485-4D18-4245-BE39-A7EF0675ACD2}.Debug|Win32.Build.0 = Debug|Win32
+		{67351485-4D18-4245-BE39-A7EF0675ACD2}.Release|Win32.ActiveCfg = Release|Win32
+		{67351485-4D18-4245-BE39-A7EF0675ACD2}.Release|Win32.Build.0 = Release|Win32
+		{39690C2A-AD89-45E4-893A-899496B85785}.Debug|Win32.ActiveCfg = Debug|Win32
+		{39690C2A-AD89-45E4-893A-899496B85785}.Debug|Win32.Build.0 = Debug|Win32
+		{39690C2A-AD89-45E4-893A-899496B85785}.Release|Win32.ActiveCfg = Release|Win32
+		{39690C2A-AD89-45E4-893A-899496B85785}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/source/common/Makefile.in b/source/common/Makefile.in
new file mode 100644
index 0000000..6efb259
--- /dev/null
+++ b/source/common/Makefile.in
@@ -0,0 +1,203 @@
+#******************************************************************************
+#
+#   Copyright (C) 1999-2007, International Business Machines
+#   Corporation and others.  All Rights Reserved.
+#
+#******************************************************************************
+## Makefile.in for ICU - icuuc.so
+## Stephen F. Booth
+
+## Source directory information
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+top_builddir = ..
+
+## All the flags and other definitions are included here.
+include $(top_builddir)/icudefs.mk
+
+## Build directory information
+subdir = common
+
+# for service hook
+LOCALSVC_CPP=localsvc.cpp
+SVC_HOOK_INC=$(top_builddir)/common/svchook.mk
+
+## Extra files to remove for 'make clean'
+CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB) $(SVC_HOOK_INC)
+
+## Target information
+
+TARGET_STUBNAME=$(COMMON_STUBNAME)
+
+ifneq ($(ENABLE_STATIC),)
+TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
+endif
+
+ifneq ($(ENABLE_SHARED),)
+SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
+ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
+
+ifeq ($(ENABLE_SO_VERSION_DATA),1)
+SO_VERSION_DATA = common.res
+endif
+
+ifeq ($(OS390BATCH),1)
+BATCH_TARGET = $(BATCH_COMMON_TARGET)
+BATCH_LIBS = $(BATCH_LIBICUDT) -lm
+endif   # OS390BATCH
+
+endif   # ENABLE_SHARED
+
+ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
+
+DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
+DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
+DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
+CFLAGS += $(LIBCFLAGS)
+CXXFLAGS += $(LIBCXXFLAGS)
+
+ifneq ($(top_builddir),$(top_srcdir))
+CPPFLAGS += -I$(top_builddir)/common
+endif
+CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/i18n $(LIBCPPFLAGS)
+DEFS += -DU_COMMON_IMPLEMENTATION
+LDFLAGS += $(LDFLAGSICUUC)
+
+# $(LIBICUDT) is either stub data or the real DLL common data.
+LIBS = $(LIBICUDT) $(DEFAULT_LIBS)
+
+OBJECTS = putil.o umath.o utypes.o uinvchar.o umutex.o ucln_cmn.o uinit.o uobject.o cmemory.o \
+udata.o ucmndata.o udatamem.o umapfile.o udataswp.o ucol_swp.o utrace.o \
+uhash.o uhash_us.o uenum.o ustrenum.o uvector.o ustack.o uvectr32.o \
+ucnv.o ucnv_bld.o ucnv_cnv.o ucnv_io.o ucnv_cb.o ucnv_err.o ucnvlat1.o \
+ucnv_u7.o ucnv_u8.o ucnv_u16.o ucnv_u32.o ucnvscsu.o ucnvbocu.o \
+ucnv_ext.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvisci.o ucnvdisp.o ucnv_set.o \
+uresbund.o ures_cnv.o uresdata.o resbund.o resbund_cnv.o \
+ucat.o locmap.o uloc.o locid.o locutil.o \
+ustr_cnv.o unistr_cnv.o unistr.o unistr_case.o unistr_props.o \
+utf_impl.o ustring.o ustrcase.o ucasemap.o cstring.o ustrfmt.o ustrtrns.o ustr_wcs.o utext.o \
+normlzr.o unorm.o unormcmp.o unorm_it.o chariter.o schriter.o uchriter.o uiter.o \
+uchar.o uprops.o ucase.o propname.o ubidi_props.o ubidi.o ubidiwrt.o ubidiln.o ushape.o \
+uscript.o usc_impl.o unames.o \
+utrie.o bmpset.o unisetspan.o uset_props.o uniset_props.o uset.o uniset.o usetiter.o ruleiter.o caniter.o unifilt.o unifunct.o \
+uarrsort.o brkiter.o ubrk.o brkeng.o dictbe.o triedict.o \
+rbbi.o rbbidata.o rbbinode.o rbbirb.o rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o \
+serv.o servnotf.o servls.o servlk.o servlkf.o servrbf.o servslkf.o \
+uidna.o usprep.o punycode.o \
+util.o util_props.o parsepos.o locbased.o cwchar.o wintz.o
+
+## Header files to install
+HEADERS = $(srcdir)/unicode/*.h unicode/*.h
+
+STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
+
+DEPS = $(OBJECTS:.o=.d)
+
+-include Makefile.local
+
+-include $(SVC_HOOK_INC)
+
+
+## List of phony targets
+.PHONY : all all-local install install-local clean clean-local	\
+distclean distclean-local install-library install-headers dist	\
+dist-local check check-local
+
+## Clear suffix list
+.SUFFIXES :
+
+## List of standard targets
+all: all-local
+install: install-local
+clean: clean-local
+distclean : distclean-local
+dist: dist-local
+check: all check-local
+
+all-local: $(ALL_TARGETS) unicode/platform.h
+
+install-local: install-headers install-library
+
+install-library: all-local
+	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
+ifneq ($(ENABLE_STATIC),)
+	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
+endif
+ifneq ($(ENABLE_SHARED),)
+	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
+ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
+	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
+ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
+	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
+endif
+endif
+ifneq ($(IMPORT_LIB_EXT),)
+	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
+ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
+	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
+endif
+ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
+	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
+endif
+endif
+endif
+
+$(SVC_HOOK_INC):
+	@echo generating $@
+	@-test -f $(top_srcdir)/common/$(LOCALSVC_CPP) && ( echo "have $(LOCALSVC_CPP) - U_LOCAL_SERVICE_HOOK=1" ; \
+		echo 'CPPFLAGS +=-DU_LOCAL_SERVICE_HOOK=1' > $@ ; \
+		echo 'OBJECTS += $(LOCALSVC_CPP:%.cpp=%.o)' >> $@ \
+		 ) ; true
+	@echo "# Autogenerated by Makefile" >> $@
+
+install-headers:
+	$(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode
+	@for file in $(HEADERS); do \
+	 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \
+	 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \
+	done
+
+dist-local:
+
+clean-local:
+	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
+
+distclean-local: clean-local
+	$(RMV) Makefile icucfg.h unicode/platform.h $(SVC_HOOK_INC)
+
+check-local:
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(SVC_HOOK_INC)
+	cd $(top_builddir) \
+	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+unicode/platform.h: $(srcdir)/unicode/platform.h.in $(top_builddir)/config.status
+	cd $(top_builddir) \
+	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+ifneq ($(ENABLE_STATIC),)
+$(TARGET): $(STATIC_OBJECTS)
+	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
+	$(RANLIB) $@
+endif
+
+ifneq ($(ENABLE_SHARED),)
+$(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
+	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
+
+ifeq ($(OS390BATCH),1)
+$(BATCH_TARGET):$(OBJECTS)
+	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
+endif   # OS390BATCH
+endif   # ENABLE_SHARED
+
+ifeq (,$(MAKECMDGOALS))
+-include $(DEPS)
+else
+ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
+-include $(DEPS)
+endif
+endif
+
diff --git a/source/common/bmpset.cpp b/source/common/bmpset.cpp
new file mode 100644
index 0000000..24b3545
--- /dev/null
+++ b/source/common/bmpset.cpp
@@ -0,0 +1,723 @@
+/*
+******************************************************************************
+*
+*   Copyright (C) 2007, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*   file name:  bmpset.cpp
+*   encoding:   US-ASCII
+*   tab size:   8 (not used)
+*   indentation:4
+*
+*   created on: 2007jan29
+*   created by: Markus W. Scherer
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/uniset.h"
+#include "cmemory.h"
+#include "bmpset.h"
+
+U_NAMESPACE_BEGIN
+
+BMPSet::BMPSet(const int32_t *parentList, int32_t parentListLength) :
+        list(parentList), listLength(parentListLength) {
+    uprv_memset(asciiBytes, 0, sizeof(asciiBytes));
+    uprv_memset(table7FF, 0, sizeof(table7FF));
+    uprv_memset(bmpBlockBits, 0, sizeof(bmpBlockBits));
+
+    /*
+     * Set the list indexes for binary searches for
+     * U+0800, U+1000, U+2000, .., U+F000, U+10000.
+     * U+0800 is the first 3-byte-UTF-8 code point. Lower code points are
+     * looked up in the bit tables.
+     * The last pair of indexes is for finding supplementary code points.
+     */
+    list4kStarts[0]=findCodePoint(0x800, 0, listLength-1);
+    int32_t i;
+    for(i=1; i<=0x10; ++i) {
+        list4kStarts[i]=findCodePoint(i<<12, list4kStarts[i-1], listLength-1);
+    }
+    list4kStarts[0x11]=listLength-1;
+
+    initBits();
+    overrideIllegal();
+}
+
+BMPSet::BMPSet(const BMPSet &otherBMPSet, const int32_t *newParentList, int32_t newParentListLength) :
+        list(newParentList), listLength(newParentListLength) {
+    uprv_memcpy(asciiBytes, otherBMPSet.asciiBytes, sizeof(asciiBytes));
+    uprv_memcpy(table7FF, otherBMPSet.table7FF, sizeof(table7FF));
+    uprv_memcpy(bmpBlockBits, otherBMPSet.bmpBlockBits, sizeof(bmpBlockBits));
+    uprv_memcpy(list4kStarts, otherBMPSet.list4kStarts, sizeof(list4kStarts));
+}
+
+BMPSet::~BMPSet() {
+}
+
+/*
+ * Set bits in a bit rectangle in "vertical" bit organization.
+ * start<limit<=0x800
+ */
+static void set32x64Bits(uint32_t table[64], int32_t start, int32_t limit) {
+    int32_t lead=start>>6;
+    int32_t trail=start&0x3f;
+
+    // Set one bit indicating an all-one block.
+    uint32_t bits=(uint32_t)1<<lead;
+    if((start+1)==limit) {  // Single-character shortcut.
+        table[trail]|=bits;
+        return;
+    }
+
+    int32_t limitLead=limit>>6;
+    int32_t limitTrail=limit&0x3f;
+
+    if(lead==limitLead) {
+        // Partial vertical bit column.
+        while(trail<limitTrail) {
+            table[trail++]|=bits;
+        }
+    } else {
+        // Partial vertical bit column,
+        // followed by a bit rectangle,
+        // followed by another partial vertical bit column.
+        if(trail>0) {
+            do {
+                table[trail++]|=bits;
+            } while(trail<64);
+            ++lead;
+        }
+        if(lead<limitLead) {
+            bits=~((1<<lead)-1);
+            if(limitLead<0x20) {
+                bits&=(1<<limitLead)-1;
+            }
+            for(trail=0; trail<64; ++trail) {
+                table[trail]|=bits;
+            }
+        }
+        bits=1<<limitLead;
+        for(trail=0; trail<limitTrail; ++trail) {
+            table[trail]|=bits;
+        }
+    }
+}
+
+void BMPSet::initBits() {
+    UChar32 start, limit;
+    int32_t listIndex=0;
+
+    // Set asciiBytes[].
+    do {
+        start=list[listIndex++];
+        if(listIndex<listLength) {
+            limit=list[listIndex++];
+        } else {
+            limit=0x110000;
+        }
+        if(start>=0x80) {
+            break;
+        }
+        do {
+            asciiBytes[start++]=1;
+        } while(start<limit && start<0x80);
+    } while(limit<=0x80);
+
+    // Set table7FF[].
+    while(start<0x800) {
+        set32x64Bits(table7FF, start, limit<=0x800 ? limit : 0x800);
+        if(limit>0x800) {
+            start=0x800;
+            break;
+        }
+
+        start=list[listIndex++];
+        if(listIndex<listLength) {
+            limit=list[listIndex++];
+        } else {
+            limit=0x110000;
+        }
+    }
+
+    // Set bmpBlockBits[].
+    int32_t minStart=0x800;
+    while(start<0x10000) {
+        if(limit>0x10000) {
+            limit=0x10000;
+        }
+
+        if(start<minStart) {
+            start=minStart;
+        }
+        if(start<limit) {  // Else: Another range entirely in a known mixed-value block.
+            if(start&0x3f) {
+                // Mixed-value block of 64 code points.
+                start>>=6;
+                bmpBlockBits[start&0x3f]|=0x10001<<(start>>6);
+                start=(start+1)<<6;  // Round up to the next block boundary.
+                minStart=start;      // Ignore further ranges in this block.
+            }
+            if(start<limit) {
+                if(start<(limit&~0x3f)) {
+                    // Multiple all-ones blocks of 64 code points each.
+                    set32x64Bits(bmpBlockBits, start>>6, limit>>6);
+                }
+
+                if(limit&0x3f) {
+                    // Mixed-value block of 64 code points.
+                    limit>>=6;
+                    bmpBlockBits[limit&0x3f]|=0x10001<<(limit>>6);
+                    limit=(limit+1)<<6;  // Round up to the next block boundary.
+                    minStart=limit;      // Ignore further ranges in this block.
+                }
+            }
+        }
+
+        if(limit==0x10000) {
+            break;
+        }
+
+        start=list[listIndex++];
+        if(listIndex<listLength) {
+            limit=list[listIndex++];
+        } else {
+            limit=0x110000;
+        }
+    }
+}
+
+/*
+ * Override some bits and bytes to the result of contains(FFFD)
+ * for faster validity checking at runtime.
+ * No need to set 0 values where they were reset to 0 in the constructor
+ * and not modified by initBits().
+ * (asciiBytes[] trail bytes, table7FF[] 0..7F, bmpBlockBits[] 0..7FF)
+ * Need to set 0 values for surrogates D800..DFFF.
+ */
+void BMPSet::overrideIllegal() {
+    uint32_t bits, mask;
+    int32_t i;
+
+    if(containsSlow(0xfffd, list4kStarts[0xf], list4kStarts[0x10])) {
+        // contains(FFFD)==TRUE
+        for(i=0x80; i<0xc0; ++i) {
+            asciiBytes[i]=1;
+        }
+
+        bits=3;                 // Lead bytes 0xC0 and 0xC1.
+        for(i=0; i<64; ++i) {
+            table7FF[i]|=bits;
+        }
+
+        bits=1;                 // Lead byte 0xE0.
+        for(i=0; i<32; ++i) {   // First half of 4k block.
+            bmpBlockBits[i]|=bits;
+        }
+
+        mask=~(0x10001<<0xd);   // Lead byte 0xED.
+        bits=1<<0xd;
+        for(i=32; i<64; ++i) {  // Second half of 4k block.
+            bmpBlockBits[i]=(bmpBlockBits[i]&mask)|bits;
+        }
+    } else {
+        // contains(FFFD)==FALSE
+        mask=~(0x10001<<0xd);   // Lead byte 0xED.
+        for(i=32; i<64; ++i) {  // Second half of 4k block.
+            bmpBlockBits[i]&=mask;
+        }
+    }
+}
+
+int32_t BMPSet::findCodePoint(UChar32 c, int32_t lo, int32_t hi) const {
+    /* Examples:
+                                       findCodePoint(c)
+       set              list[]         c=0 1 3 4 7 8
+       ===              ==============   ===========
+       []               [110000]         0 0 0 0 0 0
+       [\u0000-\u0003]  [0, 4, 110000]   1 1 1 2 2 2
+       [\u0004-\u0007]  [4, 8, 110000]   0 0 0 1 1 2
+       [:Any:]          [0, 110000]      1 1 1 1 1 1
+     */
+
+    // Return the smallest i such that c < list[i].  Assume
+    // list[len - 1] == HIGH and that c is legal (0..HIGH-1).
+    if (c < list[lo])
+        return lo;
+    // High runner test.  c is often after the last range, so an
+    // initial check for this condition pays off.
+    if (lo >= hi || c >= list[hi-1])
+        return hi;
+    // invariant: c >= list[lo]
+    // invariant: c < list[hi]
+    for (;;) {
+        int32_t i = (lo + hi) >> 1;
+        if (i == lo) {
+            break; // Found!
+        } else if (c < list[i]) {
+            hi = i;
+        } else {
+            lo = i;
+        }
+    }
+    return hi;
+}
+
+UBool
+BMPSet::contains(UChar32 c) const {
+    if((uint32_t)c<=0x7f) {
+        return (UBool)asciiBytes[c];
+    } else if((uint32_t)c<=0x7ff) {
+        return (UBool)((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))!=0);
+    } else if((uint32_t)c<0xd800 || (c>=0xe000 && c<=0xffff)) {
+        int lead=c>>12;
+        uint32_t twoBits=(bmpBlockBits[(c>>6)&0x3f]>>lead)&0x10001;
+        if(twoBits<=1) {
+            // All 64 code points with the same bits 15..6
+            // are either in the set or not.
+            return (UBool)twoBits;
+        } else {
+            // Look up the code point in its 4k block of code points.
+            return containsSlow(c, list4kStarts[lead], list4kStarts[lead+1]);
+        }
+    } else if((uint32_t)c<=0x10ffff) {
+        // surrogate or supplementary code point
+        return containsSlow(c, list4kStarts[0xd], list4kStarts[0x11]);
+    } else {
+        // Out-of-range code points get FALSE, consistent with long-standing
+        // behavior of UnicodeSet::contains(c).
+        return FALSE;
+    }
+}
+
+/*
+ * Check for sufficient length for trail unit for each surrogate pair.
+ * Handle single surrogates as surrogate code points as usual in ICU.
+ */
+const UChar *
+BMPSet::span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const {
+    UChar c, c2;
+
+    if(spanCondition) {
+        // span
+        do {
+            c=*s;
+            if(c<=0x7f) {
+                if(!asciiBytes[c]) {
+                    break;
+                }
+            } else if(c<=0x7ff) {
+                if((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))==0) {
+                    break;
+                }
+            } else if(c<0xd800 || c>=0xe000) {
+                int lead=c>>12;
+                uint32_t twoBits=(bmpBlockBits[(c>>6)&0x3f]>>lead)&0x10001;
+                if(twoBits<=1) {
+                    // All 64 code points with the same bits 15..6
+                    // are either in the set or not.
+                    if(twoBits==0) {
+                        break;
+                    }
+                } else {
+                    // Look up the code point in its 4k block of code points.
+                    if(!containsSlow(c, list4kStarts[lead], list4kStarts[lead+1])) {
+                        break;
+                    }
+                }
+            } else if(c>=0xdc00 || (s+1)==limit || (c2=s[1])<0xdc00 || c2>=0xe000) {
+                // surrogate code point
+                if(!containsSlow(c, list4kStarts[0xd], list4kStarts[0xe])) {
+                    break;
+                }
+            } else {
+                // surrogate pair
+                if(!containsSlow(U16_GET_SUPPLEMENTARY(c, c2), list4kStarts[0x10], list4kStarts[0x11])) {
+                    break;
+                }
+                ++s;
+            }
+        } while(++s<limit);
+    } else {
+        // span not
+        do {
+            c=*s;
+            if(c<=0x7f) {
+                if(asciiBytes[c]) {
+                    break;
+                }
+            } else if(c<=0x7ff) {
+                if((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))!=0) {
+                    break;
+                }
+            } else if(c<0xd800 || c>=0xe000) {
+                int lead=c>>12;
+                uint32_t twoBits=(bmpBlockBits[(c>>6)&0x3f]>>lead)&0x10001;
+                if(twoBits<=1) {
+                    // All 64 code points with the same bits 15..6
+                    // are either in the set or not.
+                    if(twoBits!=0) {
+                        break;
+                    }
+                } else {
+                    // Look up the code point in its 4k block of code points.
+                    if(containsSlow(c, list4kStarts[lead], list4kStarts[lead+1])) {
+                        break;
+                    }
+                }
+            } else if(c>=0xdc00 || (s+1)==limit || (c2=s[1])<0xdc00 || c2>=0xe000) {
+                // surrogate code point
+                if(containsSlow(c, list4kStarts[0xd], list4kStarts[0xe])) {
+                    break;
+                }
+            } else {
+                // surrogate pair
+                if(containsSlow(U16_GET_SUPPLEMENTARY(c, c2), list4kStarts[0x10], list4kStarts[0x11])) {
+                    break;
+                }
+                ++s;
+            }
+        } while(++s<limit);
+    }
+    return s;
+}
+
+/* Symmetrical with span(). */
+const UChar *
+BMPSet::spanBack(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const {
+    UChar c, c2;
+
+    if(spanCondition) {
+        // span
+        for(;;) {
+            c=*(--limit);
+            if(c<=0x7f) {
+                if(!asciiBytes[c]) {
+                    break;
+                }
+            } else if(c<=0x7ff) {
+                if((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))==0) {
+                    break;
+                }
+            } else if(c<0xd800 || c>=0xe000) {
+                int lead=c>>12;
+                uint32_t twoBits=(bmpBlockBits[(c>>6)&0x3f]>>lead)&0x10001;
+                if(twoBits<=1) {
+                    // All 64 code points with the same bits 15..6
+                    // are either in the set or not.
+                    if(twoBits==0) {
+                        break;
+                    }
+                } else {
+                    // Look up the code point in its 4k block of code points.
+                    if(!containsSlow(c, list4kStarts[lead], list4kStarts[lead+1])) {
+                        break;
+                    }
+                }
+            } else if(c<0xdc00 || s==limit || (c2=*(limit-1))<0xd800 || c2>=0xdc00) {
+                // surrogate code point
+                if(!containsSlow(c, list4kStarts[0xd], list4kStarts[0xe])) {
+                    break;
+                }
+            } else {
+                // surrogate pair
+                if(!containsSlow(U16_GET_SUPPLEMENTARY(c2, c), list4kStarts[0x10], list4kStarts[0x11])) {
+                    break;
+                }
+                --limit;
+            }
+            if(s==limit) {
+                return s;
+            }
+        }
+    } else {
+        // span not
+        for(;;) {
+            c=*(--limit);
+            if(c<=0x7f) {
+                if(asciiBytes[c]) {
+                    break;
+                }
+            } else if(c<=0x7ff) {
+                if((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))!=0) {
+                    break;
+                }
+            } else if(c<0xd800 || c>=0xe000) {
+                int lead=c>>12;
+                uint32_t twoBits=(bmpBlockBits[(c>>6)&0x3f]>>lead)&0x10001;
+                if(twoBits<=1) {
+                    // All 64 code points with the same bits 15..6
+                    // are either in the set or not.
+                    if(twoBits!=0) {
+                        break;
+                    }
+                } else {
+                    // Look up the code point in its 4k block of code points.
+                    if(containsSlow(c, list4kStarts[lead], list4kStarts[lead+1])) {
+                        break;
+                    }
+                }
+            } else if(c<0xdc00 || s==limit || (c2=*(limit-1))<0xd800 || c2>=0xdc00) {
+                // surrogate code point
+                if(containsSlow(c, list4kStarts[0xd], list4kStarts[0xe])) {
+                    break;
+                }
+            } else {
+                // surrogate pair
+                if(containsSlow(U16_GET_SUPPLEMENTARY(c2, c), list4kStarts[0x10], list4kStarts[0x11])) {
+                    break;
+                }
+                --limit;
+            }
+            if(s==limit) {
+                return s;
+            }
+        }
+    }
+    return limit+1;
+}
+
+/*
+ * Precheck for sufficient trail bytes at end of string only once per span.
+ * Check validity.
+ */
+const uint8_t *
+BMPSet::spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCondition) const {
+    const uint8_t *limit=s+length;
+    uint8_t b=*s;
+    if((int8_t)b>=0) {
+        // Initial all-ASCII span.
+        if(spanCondition) {
+            do {
+                if(!asciiBytes[b] || ++s==limit) {
+                    return s;
+                }
+                b=*s;
+            } while((int8_t)b>=0);
+        } else {
+            do {
+                if(asciiBytes[b] || ++s==limit) {
+                    return s;
+                }
+                b=*s;
+            } while((int8_t)b>=0);
+        }
+        length=(int32_t)(limit-s);
+    }
+
+    if(spanCondition!=USET_SPAN_NOT_CONTAINED) {
+        spanCondition=USET_SPAN_CONTAINED;  // Pin to 0/1 values.
+    }
+
+    const uint8_t *limit0=limit;
+
+    /*
+     * Make sure that the last 1/2/3/4-byte sequence before limit is complete
+     * or runs into a lead byte.
+     * In the span loop compare s with limit only once
+     * per multi-byte character.
+     *
+     * Give a trailing illegal sequence the same value as the result of contains(FFFD),
+     * including it if that is part of the span, otherwise set limit0 to before
+     * the truncated sequence.
+     */
+    b=*(limit-1);
+    if((int8_t)b<0) {
+        // b>=0x80: lead or trail byte
+        if(b<0xc0) {
+            // single trail byte, check for preceding 3- or 4-byte lead byte
+            if(length>=2 && (b=*(limit-2))>=0xe0) {
+                limit-=2;
+                if(asciiBytes[0x80]!=spanCondition) {
+                    limit0=limit;
+                }
+            } else if(b<0xc0 && b>=0x80 && length>=3 && (b=*(limit-3))>=0xf0) {
+                // 4-byte lead byte with only two trail bytes
+                limit-=3;
+                if(asciiBytes[0x80]!=spanCondition) {
+                    limit0=limit;
+                }
+            }
+        } else {
+            // lead byte with no trail bytes
+            --limit;
+            if(asciiBytes[0x80]!=spanCondition) {
+                limit0=limit;
+            }
+        }
+    }
+
+    uint8_t t1, t2, t3;
+
+    while(s<limit) {
+        b=*s;
+        if(b<0xc0) {
+            // ASCII; or trail bytes with the result of contains(FFFD).
+            if(spanCondition) {
+                do {
+                    if(!asciiBytes[b]) {
+                        return s;
+                    } else if(++s==limit) {
+                        return limit0;
+                    }
+                    b=*s;
+                } while(b<0xc0);
+            } else {
+                do {
+                    if(asciiBytes[b]) {
+                        return s;
+                    } else if(++s==limit) {
+                        return limit0;
+                    }
+                    b=*s;
+                } while(b<0xc0);
+            }
+        }
+        ++s;  // Advance past the lead byte.
+        if(b>=0xe0) {
+            if(b<0xf0) {
+                if( /* handle U+0000..U+FFFF inline */
+                    (t1=(uint8_t)(s[0]-0x80)) <= 0x3f &&
+                    (t2=(uint8_t)(s[1]-0x80)) <= 0x3f
+                ) {
+                    b&=0xf;
+                    uint32_t twoBits=(bmpBlockBits[t1]>>b)&0x10001;
+                    if(twoBits<=1) {
+                        // All 64 code points with this lead byte and middle trail byte
+                        // are either in the set or not.
+                        if(twoBits!=(uint32_t)spanCondition) {
+                            return s-1;
+                        }
+                    } else {
+                        // Look up the code point in its 4k block of code points.
+                        UChar32 c=(b<<12)|(t1<<6)|t2;
+                        if(containsSlow(c, list4kStarts[b], list4kStarts[b+1]) != spanCondition) {
+                            return s-1;
+                        }
+                    }
+                    s+=2;
+                    continue;
+                }
+            } else if( /* handle U+10000..U+10FFFF inline */
+                (t1=(uint8_t)(s[0]-0x80)) <= 0x3f &&
+                (t2=(uint8_t)(s[1]-0x80)) <= 0x3f &&
+                (t3=(uint8_t)(s[2]-0x80)) <= 0x3f
+            ) {
+                // Give an illegal sequence the same value as the result of contains(FFFD).
+                UChar32 c=((UChar32)(b-0xf0)<<18)|((UChar32)t1<<12)|(t2<<6)|t3;
+                if( (   (0x10000<=c && c<=0x10ffff) ?
+                            containsSlow(c, list4kStarts[0x10], list4kStarts[0x11]) :
+                            asciiBytes[0x80]
+                    ) != spanCondition
+                ) {
+                    return s-1;
+                }
+                s+=3;
+                continue;
+            }
+        } else /* 0xc0<=b<0xe0 */ {
+            if( /* handle U+0000..U+07FF inline */
+                (t1=(uint8_t)(*s-0x80)) <= 0x3f
+            ) {
+                if(((table7FF[t1]&((uint32_t)1<<(b&0x1f)))!=0) != spanCondition) {
+                    return s-1;
+                }
+                ++s;
+                continue;
+            }
+        }
+
+        // Give an illegal sequence the same value as the result of contains(FFFD).
+        // Handle each byte of an illegal sequence separately to simplify the code;
+        // no need to optimize error handling.
+        if(asciiBytes[0x80]!=spanCondition) {
+            return s-1;
+        }
+    }
+
+    return limit0;
+}
+
+/*
+ * While going backwards through UTF-8 optimize only for ASCII.
+ * Unlike UTF-16, UTF-8 is not forward-backward symmetrical, that is, it is not
+ * possible to tell from the last byte in a multi-byte sequence how many
+ * preceding bytes there should be. Therefore, going backwards through UTF-8
+ * is much harder than going forward.
+ */
+int32_t
+BMPSet::spanBackUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCondition) const {
+    if(spanCondition!=USET_SPAN_NOT_CONTAINED) {
+        spanCondition=USET_SPAN_CONTAINED;  // Pin to 0/1 values.
+    }
+
+    uint8_t b;
+
+    do {
+        b=s[--length];
+        if((int8_t)b>=0) {
+            // ASCII sub-span
+            if(spanCondition) {
+                do {
+                    if(!asciiBytes[b]) {
+                        return length+1;
+                    } else if(length==0) {
+                        return 0;
+                    }
+                    b=s[--length];
+                } while((int8_t)b>=0);
+            } else {
+                do {
+                    if(asciiBytes[b]) {
+                        return length+1;
+                    } else if(length==0) {
+                        return 0;
+                    }
+                    b=s[--length];
+                } while((int8_t)b>=0);
+            }
+        }
+
+        int32_t prev=length;
+        UChar32 c;
+        if(b<0xc0) {
+            // trail byte: collect a multi-byte character
+            c=utf8_prevCharSafeBody(s, 0, &length, b, -1);
+            if(c<0) {
+                c=0xfffd;
+            }
+        } else {
+            // lead byte in last-trail position
+            c=0xfffd;
+        }
+        // c is a valid code point, not ASCII, not a surrogate
+        if(c<=0x7ff) {
+            if(((table7FF[c&0x3f]&((uint32_t)1<<(c>>6)))!=0) != spanCondition) {
+                return prev+1;
+            }
+        } else if(c<=0xffff) {
+            int lead=c>>12;
+            uint32_t twoBits=(bmpBlockBits[(c>>6)&0x3f]>>lead)&0x10001;
+            if(twoBits<=1) {
+                // All 64 code points with the same bits 15..6
+                // are either in the set or not.
+                if(twoBits!=(uint32_t)spanCondition) {
+                    return prev+1;
+                }
+            } else {
+                // Look up the code point in its 4k block of code points.
+                if(containsSlow(c, list4kStarts[lead], list4kStarts[lead+1]) != spanCondition) {
+                    return prev+1;
+                }
+            }
+        } else {
+            if(containsSlow(c, list4kStarts[0x10], list4kStarts[0x11]) != spanCondition) {
+                return prev+1;
+            }
+        }
+    } while(length>0);
+    return 0;
+}
+
+U_NAMESPACE_END
diff --git a/source/common/bmpset.h b/source/common/bmpset.h
new file mode 100644
index 0000000..d9e08ea
--- /dev/null
+++ b/source/common/bmpset.h
@@ -0,0 +1,161 @@
+/*
+******************************************************************************
+*
+*   Copyright (C) 2007, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*   file name:  bmpset.h
+*   encoding:   US-ASCII
+*   tab size:   8 (not used)
+*   indentation:4
+*
+*   created on: 2007jan29
+*   created by: Markus W. Scherer
+*/
+
+#ifndef __BMPSET_H__
+#define __BMPSET_H__
+
+#include "unicode/utypes.h"
+#include "unicode/uniset.h"
+
+U_NAMESPACE_BEGIN
+
+/*
+ * Helper class for frozen UnicodeSets, implements contains() and span()
+ * optimized for BMP code points. Structured to be UTF-8-friendly.
+ *
+ * ASCII: Look up bytes.
+ * 2-byte characters: Bits organized vertically.
+ * 3-byte characters: Use zero/one/mixed data per 64-block in U+0000..U+FFFF,
+ *                    with mixed for illegal ranges.
+ * Supplementary characters: Call contains() on the parent set.
+ */
+class BMPSet : public UMemory {
+public:
+    BMPSet(const int32_t *parentList, int32_t parentListLength);
+    BMPSet(const BMPSet &otherBMPSet, const int32_t *newParentList, int32_t newParentListLength);
+    virtual ~BMPSet();
+
+    virtual UBool contains(UChar32 c) const;
+
+    /*
+     * Span the initial substring for which each character c has spanCondition==contains(c).
+     * It must be s<limit and spanCondition==0 or 1.
+     * @return The string pointer which limits the span.
+     */
+    const UChar *span(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const;
+
+    /*
+     * Span the trailing substring for which each character c has spanCondition==contains(c).
+     * It must be s<limit and spanCondition==0 or 1.
+     * @return The string pointer which starts the span.
+     */
+    const UChar *spanBack(const UChar *s, const UChar *limit, USetSpanCondition spanCondition) const;
+
+    /*
+     * Span the initial substring for which each character c has spanCondition==contains(c).
+     * It must be length>0 and spanCondition==0 or 1.
+     * @return The string pointer which limits the span.
+     */
+    const uint8_t *spanUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCondition) const;
+
+    /*
+     * Span the trailing substring for which each character c has spanCondition==contains(c).
+     * It must be length>0 and spanCondition==0 or 1.
+     * @return The start of the span.
+     */
+    int32_t spanBackUTF8(const uint8_t *s, int32_t length, USetSpanCondition spanCondition) const;
+
+private:
+    void initBits();
+    void overrideIllegal();
+
+    /**
+     * Same as UnicodeSet::findCodePoint(UChar32 c) const except that the
+     * binary search is restricted for finding code points in a certain range.
+     *
+     * For restricting the search for finding in the range start..end,
+     * pass in
+     *   lo=findCodePoint(start) and
+     *   hi=findCodePoint(end)
+     * with 0<=lo<=hi<len.
+     * findCodePoint(c) defaults to lo=0 and hi=len-1.
+     *
+     * @param c a character in a subrange of MIN_VALUE..MAX_VALUE
+     * @param lo The lowest index to be returned.
+     * @param hi The highest index to be returned.
+     * @return the smallest integer i in the range lo..hi,
+     *         inclusive, such that c < list[i]
+     */
+    int32_t findCodePoint(UChar32 c, int32_t lo, int32_t hi) const;
+
+    inline UBool containsSlow(UChar32 c, int32_t lo, int32_t hi) const;
+
+    /*
+     * One byte per ASCII character, or trail byte in lead position.
+     * 0 or 1 for ASCII characters.
+     * The value for trail bytes is the result of contains(FFFD)
+     * for faster validity checking at runtime.
+     */
+    UBool asciiBytes[0xc0];
+
+    /*
+     * One bit per code point from U+0000..U+07FF.
+     * The bits are organized vertically; consecutive code points
+     * correspond to the same bit positions in consecutive table words.
+     * With code point parts
+     *   lead=c{10..6}
+     *   trail=c{5..0}
+     * it is set.contains(c)==(table7FF[trail] bit lead)
+     *
+     * Bits for 0..7F (non-shortest forms) are set to the result of contains(FFFD)
+     * for faster validity checking at runtime.
+     */
+    uint32_t table7FF[64];
+
+    /*
+     * One bit per 64 BMP code points.
+     * The bits are organized vertically; consecutive 64-code point blocks
+     * correspond to the same bit position in consecutive table words.
+     * With code point parts
+     *   lead=c{15..12}
+     *   t1=c{11..6}
+     * test bits (lead+16) and lead in bmpBlockBits[t1].
+     * If the upper bit is 0, then the lower bit indicates if contains(c)
+     * for all code points in the 64-block.
+     * If the upper bit is 1, then the block is mixed and set.contains(c)
+     * must be called.
+     *
+     * Bits for 0..7FF (non-shortest forms) and D800..DFFF are set to
+     * the result of contains(FFFD) for faster validity checking at runtime.
+     */
+    uint32_t bmpBlockBits[64];
+
+    /*
+     * Inversion list indexes for restricted binary searches in
+     * findCodePoint(), from
+     * findCodePoint(U+0800, U+1000, U+2000, .., U+F000, U+10000).
+     * U+0800 is the first 3-byte-UTF-8 code point. Code points below U+0800 are
+     * always looked up in the bit tables.
+     * The last pair of indexes is for finding supplementary code points.
+     */
+    int32_t list4kStarts[18];
+
+    /*
+     * The inversion list of the parent set, for the slower contains() implementation
+     * for mixed BMP blocks and for supplementary code points.
+     * The list is terminated with list[listLength-1]=0x110000.
+     */
+    const int32_t *list;
+    int32_t listLength;
+};
+
+inline UBool BMPSet::containsSlow(UChar32 c, int32_t lo, int32_t hi) const {
+    return (UBool)(findCodePoint(c, lo, hi) & 1);
+}
+
+U_NAMESPACE_END
+
+#endif
diff --git a/source/common/brkeng.cpp b/source/common/brkeng.cpp
new file mode 100644
index 0000000..2419be5
--- /dev/null
+++ b/source/common/brkeng.cpp
@@ -0,0 +1,290 @@
+/**
+ ************************************************************************************
+ * Copyright (C) 2006-2007, International Business Machines Corporation and others. *
+ * All Rights Reserved.                                                             *
+ ************************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "brkeng.h"
+#include "dictbe.h"
+#include "triedict.h"
+#include "unicode/uchar.h"
+#include "unicode/uniset.h"
+#include "unicode/chariter.h"
+#include "unicode/ures.h"
+#include "unicode/udata.h"
+#include "unicode/putil.h"
+#include "unicode/ustring.h"
+#include "unicode/uscript.h"
+#include "uvector.h"
+#include "umutex.h"
+#include "uresimp.h"
+#include "ubrkimpl.h"
+
+U_NAMESPACE_BEGIN
+
+/*
+ ******************************************************************
+ */
+
+LanguageBreakEngine::LanguageBreakEngine() {
+}
+
+LanguageBreakEngine::~LanguageBreakEngine() {
+}
+
+/*
+ ******************************************************************
+ */
+
+LanguageBreakFactory::LanguageBreakFactory() {
+}
+
+LanguageBreakFactory::~LanguageBreakFactory() {
+}
+
+/*
+ ******************************************************************
+ */
+
+UnhandledEngine::UnhandledEngine(UErrorCode &/*status*/) {
+    for (int32_t i = 0; i < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0])); ++i) {
+        fHandled[i] = 0;
+    }
+}
+
+UnhandledEngine::~UnhandledEngine() {
+    for (int32_t i = 0; i < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0])); ++i) {
+        if (fHandled[i] != 0) {
+            delete fHandled[i];
+        }
+    }
+}
+
+UBool
+UnhandledEngine::handles(UChar32 c, int32_t breakType) const {
+    return (breakType >= 0 && breakType < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0]))
+        && fHandled[breakType] != 0 && fHandled[breakType]->contains(c));
+}
+
+int32_t
+UnhandledEngine::findBreaks( UText *text,
+                                 int32_t startPos,
+                                 int32_t endPos,
+                                 UBool reverse,
+                                 int32_t breakType,
+                                 UStack &/*foundBreaks*/ ) const {
+    if (breakType >= 0 && breakType < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0]))) {
+        UChar32 c = utext_current32(text); 
+        if (reverse) {
+            while((int32_t)utext_getNativeIndex(text) > startPos && fHandled[breakType]->contains(c)) {
+                c = utext_previous32(text);
+            }
+        }
+        else {
+            while((int32_t)utext_getNativeIndex(text) < endPos && fHandled[breakType]->contains(c)) {
+                utext_next32(text);            // TODO:  recast loop to work with post-increment operations.
+                c = utext_current32(text);
+            }
+        }
+    }
+    return 0;
+}
+
+void
+UnhandledEngine::handleCharacter(UChar32 c, int32_t breakType) {
+    if (breakType >= 0 && breakType < (int32_t)(sizeof(fHandled)/sizeof(fHandled[0]))) {
+        if (fHandled[breakType] == 0) {
+            fHandled[breakType] = new UnicodeSet();
+            if (fHandled[breakType] == 0) {
+                return;
+            }
+        }
+        if (!fHandled[breakType]->contains(c)) {
+            UErrorCode status = U_ZERO_ERROR;
+            // Apply the entire script of the character.
+            int32_t script = u_getIntPropertyValue(c, UCHAR_SCRIPT);
+            fHandled[breakType]->applyIntPropertyValue(UCHAR_SCRIPT, script, status);
+        }
+    }
+}
+
+/*
+ ******************************************************************
+ */
+
+ICULanguageBreakFactory::ICULanguageBreakFactory(UErrorCode &/*status*/) {
+    fEngines = 0;
+}
+
+ICULanguageBreakFactory::~ICULanguageBreakFactory() {
+    if (fEngines != 0) {
+        delete fEngines;
+    }
+}
+
+U_NAMESPACE_END
+U_CDECL_BEGIN
+static void U_CALLCONV _deleteEngine(void *obj) {
+    delete (const U_NAMESPACE_QUALIFIER LanguageBreakEngine *) obj;
+}
+U_CDECL_END
+U_NAMESPACE_BEGIN
+
+const LanguageBreakEngine *
+ICULanguageBreakFactory::getEngineFor(UChar32 c, int32_t breakType) {
+    UBool       needsInit;
+    int32_t     i;
+    const LanguageBreakEngine *lbe = NULL;
+    UErrorCode  status = U_ZERO_ERROR;
+
+    // TODO: The global mutex should not be used.
+    // The global mutex should only be used for short periods.
+    // A ICULanguageBreakFactory specific mutex should be used.
+    umtx_lock(NULL);
+    needsInit = (UBool)(fEngines == NULL);
+    if (!needsInit) {
+        i = fEngines->size();
+        while (--i >= 0) {
+            lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i));
+            if (lbe != NULL && lbe->handles(c, breakType)) {
+                break;
+            }
+            lbe = NULL;
+        }
+    }
+    umtx_unlock(NULL);
+    
+    if (lbe != NULL) {
+        return lbe;
+    }
+    
+    if (needsInit) {
+        UStack  *engines = new UStack(_deleteEngine, NULL, status);
+        if (U_SUCCESS(status) && engines == NULL) {
+            status = U_MEMORY_ALLOCATION_ERROR;
+        }
+        else if (U_FAILURE(status)) {
+            delete engines;
+            engines = NULL;
+        }
+        else {
+            umtx_lock(NULL);
+            if (fEngines == NULL) {
+                fEngines = engines;
+                engines = NULL;
+            }
+            umtx_unlock(NULL);
+            delete engines;
+        }
+    }
+    
+    if (fEngines == NULL) {
+        return NULL;
+    }
+
+    // We didn't find an engine the first time through, or there was no
+    // stack. Create an engine.
+    const LanguageBreakEngine *newlbe = loadEngineFor(c, breakType);
+    
+    // Now get the lock, and see if someone else has created it in the
+    // meantime
+    umtx_lock(NULL);
+    i = fEngines->size();
+    while (--i >= 0) {
+        lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i));
+        if (lbe != NULL && lbe->handles(c, breakType)) {
+            break;
+        }
+        lbe = NULL;
+    }
+    if (lbe == NULL && newlbe != NULL) {
+        fEngines->push((void *)newlbe, status);
+        lbe = newlbe;
+        newlbe = NULL;
+    }
+    umtx_unlock(NULL);
+    
+    delete newlbe;
+
+    return lbe;
+}
+
+const LanguageBreakEngine *
+ICULanguageBreakFactory::loadEngineFor(UChar32 c, int32_t breakType) {
+    UErrorCode status = U_ZERO_ERROR;
+    UScriptCode code = uscript_getScript(c, &status);
+    if (U_SUCCESS(status)) {
+        const CompactTrieDictionary *dict = loadDictionaryFor(code, breakType);
+        if (dict != NULL) {
+            const LanguageBreakEngine *engine = NULL;
+            switch(code) {
+            case USCRIPT_THAI:
+                engine = new ThaiBreakEngine(dict, status);
+                break;
+            default:
+                break;
+            }
+            if (engine == NULL) {
+                delete dict;
+            }
+            else if (U_FAILURE(status)) {
+                delete engine;
+                engine = NULL;
+            }
+            return engine;
+        }
+    }
+    return NULL;
+}
+
+const CompactTrieDictionary *
+ICULanguageBreakFactory::loadDictionaryFor(UScriptCode script, int32_t /*breakType*/) {
+    UErrorCode status = U_ZERO_ERROR;
+    // Open root from brkitr tree.
+    char dictnbuff[256];
+    char ext[4]={'\0'};
+
+    UResourceBundle *b = ures_open(U_ICUDATA_BRKITR, "", &status);
+    b = ures_getByKeyWithFallback(b, "dictionaries", b, &status);
+    b = ures_getByKeyWithFallback(b, uscript_getShortName(script), b, &status);
+    int32_t dictnlength = 0;
+    const UChar *dictfname = ures_getString(b, &dictnlength, &status);
+    if (U_SUCCESS(status) && (size_t)dictnlength >= sizeof(dictnbuff)) {
+        dictnlength = 0;
+        status = U_BUFFER_OVERFLOW_ERROR;
+    }
+    if (U_SUCCESS(status) && dictfname) {
+        UChar* extStart=u_strchr(dictfname, 0x002e);
+        int len = 0;
+        if(extStart!=NULL){
+            len = extStart-dictfname;
+            u_UCharsToChars(extStart+1, ext, sizeof(ext)); // nul terminates the buff
+            u_UCharsToChars(dictfname, dictnbuff, len);
+        }
+        dictnbuff[len]=0; // nul terminate
+    }
+    ures_close(b);
+    UDataMemory *file = udata_open(U_ICUDATA_BRKITR, ext, dictnbuff, &status);
+    if (U_SUCCESS(status)) {
+        const CompactTrieDictionary *dict = new CompactTrieDictionary(
+            file, status);
+        if (U_SUCCESS(status) && dict == NULL) {
+            status = U_MEMORY_ALLOCATION_ERROR;
+        }
+        if (U_FAILURE(status)) {
+            delete dict;
+            dict = NULL;
+        }
+        return dict;
+    }
+    return NULL;
+}
+
+U_NAMESPACE_END
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
diff --git a/source/common/brkeng.h b/source/common/brkeng.h
new file mode 100644
index 0000000..618b2ae
--- /dev/null
+++ b/source/common/brkeng.h
@@ -0,0 +1,292 @@
+/**
+ ************************************************************************************
+ * Copyright (C) 2006-2007, International Business Machines Corporation and others. *
+ * All Rights Reserved.                                                             *
+ ************************************************************************************
+ */
+
+#ifndef BRKENG_H
+#define BRKENG_H
+
+#include "unicode/utypes.h"
+#include "unicode/uobject.h"
+#include "unicode/utext.h"
+#include "unicode/uscript.h"
+
+U_NAMESPACE_BEGIN
+
+class UnicodeSet;
+class UStack;
+class CompactTrieDictionary;
+
+/*******************************************************************
+ * LanguageBreakEngine
+ */
+
+/**
+ * <p>LanguageBreakEngines implement language-specific knowledge for
+ * finding text boundaries within a run of characters belonging to a
+ * specific set. The boundaries will be of a specific kind, e.g. word,
+ * line, etc.</p>
+ *
+ * <p>LanguageBreakEngines should normally be implemented so as to
+ * be shared between threads without locking.</p>
+ */
+class LanguageBreakEngine : public UMemory {
+ public:
+
+  /**
+   * <p>Default constructor.</p>
+   *
+   */
+  LanguageBreakEngine();
+
+  /**
+   * <p>Virtual destructor.</p>
+   */
+  virtual ~LanguageBreakEngine();
+
+ /**
+  * <p>Indicate whether this engine handles a particular character for
+  * a particular kind of break.</p>
+  *
+  * @param c A character which begins a run that the engine might handle
+  * @param breakType The type of text break which the caller wants to determine
+  * @return TRUE if this engine handles the particular character and break
+  * type.
+  */
+  virtual UBool handles(UChar32 c, int32_t breakType) const = 0;
+
+ /**
+  * <p>Find any breaks within a run in the supplied text.</p>
+  *
+  * @param text A UText representing the text. The
+  * iterator is left at the end of the run of characters which the engine
+  * is capable of handling.
+  * @param startPos The start of the run within the supplied text.
+  * @param endPos The end of the run within the supplied text.
+  * @param reverse Whether the caller is looking for breaks in a reverse
+  * direction.
+  * @param breakType The type of break desired, or -1.
+  * @param foundBreaks An allocated C array of the breaks found, if any
+  * @return The number of breaks found.
+  */
+  virtual int32_t findBreaks( UText *text,
+                              int32_t startPos,
+                              int32_t endPos,
+                              UBool reverse,
+                              int32_t breakType,
+                              UStack &foundBreaks ) const = 0;
+
+};
+
+/*******************************************************************
+ * LanguageBreakFactory
+ */
+
+/**
+ * <p>LanguageBreakFactorys find and return a LanguageBreakEngine
+ * that can determine breaks for characters in a specific set, if
+ * such an object can be found.</p>
+ *
+ * <p>If a LanguageBreakFactory is to be shared between threads,
+ * appropriate synchronization must be used; there is none internal
+ * to the factory.</p>
+ *
+ * <p>A LanguageBreakEngine returned by a LanguageBreakFactory can
+ * normally be shared between threads without synchronization, unless
+ * the specific subclass of LanguageBreakFactory indicates otherwise.</p>
+ *
+ * <p>A LanguageBreakFactory is responsible for deleting any LanguageBreakEngine
+ * it returns when it itself is deleted, unless the specific subclass of
+ * LanguageBreakFactory indicates otherwise. Naturally, the factory should
+ * not be deleted until the LanguageBreakEngines it has returned are no
+ * longer needed.</p>
+ */
+class LanguageBreakFactory : public UMemory {
+ public:
+
+  /**
+   * <p>Default constructor.</p>
+   *
+   */
+  LanguageBreakFactory();
+
+  /**
+   * <p>Virtual destructor.</p>
+   */
+  virtual ~LanguageBreakFactory();
+
+ /**
+  * <p>Find and return a LanguageBreakEngine that can find the desired
+  * kind of break for the set of characters to which the supplied
+  * character belongs. It is up to the set of available engines to
+  * determine what the sets of characters are.</p>
+  *
+  * @param c A character that begins a run for which a LanguageBreakEngine is
+  * sought.
+  * @param breakType The kind of text break for which a LanguageBreakEngine is
+  * sought.
+  * @return A LanguageBreakEngine with the desired characteristics, or 0.
+  */
+  virtual const LanguageBreakEngine *getEngineFor(UChar32 c, int32_t breakType) = 0;
+
+};
+
+/*******************************************************************
+ * UnhandledEngine
+ */
+
+/**
+ * <p>UnhandledEngine is a special subclass of LanguageBreakEngine that
+ * handles characters that no other LanguageBreakEngine is available to
+ * handle. It is told the character and the type of break; at its
+ * discretion it may handle more than the specified character (e.g.,
+ * the entire script to which that character belongs.</p>
+ *
+ * <p>UnhandledEngines may not be shared between threads without
+ * external synchronization.</p>
+ */
+
+class UnhandledEngine : public LanguageBreakEngine {
+ private:
+
+    /**
+     * The sets of characters handled, for each break type
+     * @internal
+     */
+
+  UnicodeSet    *fHandled[4];
+
+ public:
+
+  /**
+   * <p>Default constructor.</p>
+   *
+   */
+  UnhandledEngine(UErrorCode &status);
+
+  /**
+   * <p>Virtual destructor.</p>
+   */
+  virtual ~UnhandledEngine();
+
+ /**
+  * <p>Indicate whether this engine handles a particular character for
+  * a particular kind of break.</p>
+  *
+  * @param c A character which begins a run that the engine might handle
+  * @param breakType The type of text break which the caller wants to determine
+  * @return TRUE if this engine handles the particular character and break
+  * type.
+  */
+  virtual UBool handles(UChar32 c, int32_t breakType) const;
+
+ /**
+  * <p>Find any breaks within a run in the supplied text.</p>
+  *
+  * @param text A UText representing the text (TODO: UText). The
+  * iterator is left at the end of the run of characters which the engine
+  * is capable of handling.
+  * @param startPos The start of the run within the supplied text.
+  * @param endPos The end of the run within the supplied text.
+  * @param reverse Whether the caller is looking for breaks in a reverse
+  * direction.
+  * @param breakType The type of break desired, or -1.
+  * @param foundBreaks An allocated C array of the breaks found, if any
+  * @return The number of breaks found.
+  */
+  virtual int32_t findBreaks( UText *text,
+                              int32_t startPos,
+                              int32_t endPos,
+                              UBool reverse,
+                              int32_t breakType,
+                              UStack &foundBreaks ) const;
+
+ /**
+  * <p>Tell the engine to handle a particular character and break type.</p>
+  *
+  * @param c A character which the engine should handle
+  * @param breakType The type of text break for which the engine should handle c
+  */
+  virtual void handleCharacter(UChar32 c, int32_t breakType);
+
+};
+
+/*******************************************************************
+ * ICULanguageBreakFactory
+ */
+
+/**
+ * <p>ICULanguageBreakFactory is the default LanguageBreakFactory for
+ * ICU. It creates dictionary-based LanguageBreakEngines from dictionary
+ * data in the ICU data file.</p>
+ */
+class ICULanguageBreakFactory : public LanguageBreakFactory {
+ private:
+
+    /**
+     * The stack of break engines created by this factory
+     * @internal
+     */
+
+  UStack    *fEngines;
+
+ public:
+
+  /**
+   * <p>Standard constructor.</p>
+   *
+   */
+  ICULanguageBreakFactory(UErrorCode &status);
+
+  /**
+   * <p>Virtual destructor.</p>
+   */
+  virtual ~ICULanguageBreakFactory();
+
+ /**
+  * <p>Find and return a LanguageBreakEngine that can find the desired
+  * kind of break for the set of characters to which the supplied
+  * character belongs. It is up to the set of available engines to
+  * determine what the sets of characters are.</p>
+  *
+  * @param c A character that begins a run for which a LanguageBreakEngine is
+  * sought.
+  * @param breakType The kind of text break for which a LanguageBreakEngine is
+  * sought.
+  * @return A LanguageBreakEngine with the desired characteristics, or 0.
+  */
+  virtual const LanguageBreakEngine *getEngineFor(UChar32 c, int32_t breakType);
+
+ protected:
+
+ /**
+  * <p>Create a LanguageBreakEngine for the set of characters to which
+  * the supplied character belongs, for the specified break type.</p>
+  *
+  * @param c A character that begins a run for which a LanguageBreakEngine is
+  * sought.
+  * @param breakType The kind of text break for which a LanguageBreakEngine is
+  * sought.
+  * @return A LanguageBreakEngine with the desired characteristics, or 0.
+  */
+  virtual const LanguageBreakEngine *loadEngineFor(UChar32 c, int32_t breakType);
+
+ /**
+  * <p>Create a CompactTrieDictionary for the specified script and break type.</p>
+  *
+  * @param script An ISO 15924 script code that identifies the dictionary to be
+  * created.
+  * @param breakType The kind of text break for which a dictionary is
+  * sought.
+  * @return A CompactTrieDictionary with the desired characteristics, or 0.
+  */
+  virtual const CompactTrieDictionary *loadDictionaryFor(UScriptCode script, int32_t breakType);
+
+};
+
+U_NAMESPACE_END
+
+    /* BRKENG_H */
+#endif
diff --git a/source/common/brkiter.cpp b/source/common/brkiter.cpp
new file mode 100644
index 0000000..3bfc13a
--- /dev/null
+++ b/source/common/brkiter.cpp
@@ -0,0 +1,454 @@
+/*
+*******************************************************************************
+* Copyright (C) 1997-2007, International Business Machines Corporation and    *
+* others. All Rights Reserved.                                                *
+*******************************************************************************
+*
+* File TXTBDRY.CPP
+*
+* Modification History:
+*
+*   Date        Name        Description
+*   02/18/97    aliu        Converted from OpenClass.  Added DONE.
+*   01/13/2000  helena      Added UErrorCode parameter to createXXXInstance methods.
+*****************************************************************************************
+*/
+
+// *****************************************************************************
+// This file was generated from the java source file BreakIterator.java
+// *****************************************************************************
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "unicode/rbbi.h"
+#include "unicode/brkiter.h"
+#include "unicode/udata.h"
+#include "unicode/ures.h"
+#include "unicode/ustring.h"
+#include "ucln_cmn.h"
+#include "cstring.h"
+#include "umutex.h"
+#include "servloc.h"
+#include "locbased.h"
+#include "uresimp.h"
+#include "uassert.h"
+#include "ubrkimpl.h"
+
+// *****************************************************************************
+// class BreakIterator
+// This class implements methods for finding the location of boundaries in text.
+// Instances of BreakIterator maintain a current position and scan over text
+// returning the index of characters where boundaries occur.
+// *****************************************************************************
+
+U_NAMESPACE_BEGIN
+
+// -------------------------------------
+
+BreakIterator*
+BreakIterator::buildInstance(const Locale& loc, const char *type, int32_t kind, UErrorCode &status)
+{
+    char fnbuff[256];
+    char ext[4]={'\0'};
+    char actualLocale[ULOC_FULLNAME_CAPACITY];
+    int32_t size;
+    const UChar* brkfname = NULL;
+    UResourceBundle brkRulesStack;
+    UResourceBundle brkNameStack;
+    UResourceBundle *brkRules = &brkRulesStack;
+    UResourceBundle *brkName  = &brkNameStack;
+    RuleBasedBreakIterator *result = NULL;
+
+    if (U_FAILURE(status))
+        return NULL;
+
+    ures_initStackObject(brkRules);
+    ures_initStackObject(brkName);
+
+    // Get the locale
+    UResourceBundle *b = ures_open(U_ICUDATA_BRKITR, loc.getName(), &status);
+    /* this is a hack for now. Should be fixed when the data is fetched from
+        brk_index.txt */
+    if(status==U_USING_DEFAULT_WARNING){
+        status=U_ZERO_ERROR;
+        ures_openFillIn(b, U_ICUDATA_BRKITR, "", &status);
+    }
+
+    // Get the "boundaries" array.
+    if (U_SUCCESS(status)) {
+        brkRules = ures_getByKeyWithFallback(b, "boundaries", brkRules, &status);
+        // Get the string object naming the rules file
+        brkName = ures_getByKeyWithFallback(brkRules, type, brkName, &status);
+        // Get the actual string
+        brkfname = ures_getString(brkName, &size, &status);
+        U_ASSERT((size_t)size<sizeof(fnbuff));
+        if ((size_t)size>=sizeof(fnbuff)) {
+            size=0;
+            if (U_SUCCESS(status)) {
+                status = U_BUFFER_OVERFLOW_ERROR;
+            }
+        }
+
+        // Use the string if we found it
+        if (U_SUCCESS(status) && brkfname) {
+            uprv_strncpy(actualLocale,
+                ures_getLocale(brkName, &status),
+                sizeof(actualLocale)/sizeof(actualLocale[0]));
+
+            UChar* extStart=u_strchr(brkfname, 0x002e);
+            int len = 0;
+            if(extStart!=NULL){
+                len = extStart-brkfname;
+                u_UCharsToChars(extStart+1, ext, sizeof(ext)); // nul terminates the buff
+                u_UCharsToChars(brkfname, fnbuff, len);
+            }
+            fnbuff[len]=0; // nul terminate
+        }
+    }
+
+    ures_close(brkRules);
+    ures_close(brkName);
+
+    UDataMemory* file = udata_open(U_ICUDATA_BRKITR, ext, fnbuff, &status);
+    if (U_FAILURE(status)) {
+        ures_close(b);
+        return NULL;
+    }
+
+    // Create a RuleBasedBreakIterator
+    result = new RuleBasedBreakIterator(file, status);
+
+    // If there is a result, set the valid locale and actual locale, and the kind
+    if (U_SUCCESS(status) && result != NULL) {
+        U_LOCALE_BASED(locBased, *(BreakIterator*)result);
+        locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status), actualLocale);
+        result->setBreakType(kind);
+    }
+
+    ures_close(b);
+
+    if (U_FAILURE(status) && result != NULL) {  // Sometimes redundant check, but simple
+        delete result;
+        return NULL;
+    }
+
+    if (result == NULL) {
+        udata_close(file);
+        if (U_SUCCESS(status)) {
+            status = U_MEMORY_ALLOCATION_ERROR;
+        }
+    }
+
+    return result;
+}
+
+// Creates a break iterator for word breaks.
+BreakIterator* U_EXPORT2
+BreakIterator::createWordInstance(const Locale& key, UErrorCode& status)
+{
+    return createInstance(key, UBRK_WORD, status);
+}
+
+// -------------------------------------
+
+// Creates a break iterator  for line breaks.
+BreakIterator* U_EXPORT2
+BreakIterator::createLineInstance(const Locale& key, UErrorCode& status)
+{
+    return createInstance(key, UBRK_LINE, status);
+}
+
+// -------------------------------------
+
+// Creates a break iterator  for character breaks.
+BreakIterator* U_EXPORT2
+BreakIterator::createCharacterInstance(const Locale& key, UErrorCode& status)
+{
+    return createInstance(key, UBRK_CHARACTER, status);
+}
+
+// -------------------------------------
+
+// Creates a break iterator  for sentence breaks.
+BreakIterator* U_EXPORT2
+BreakIterator::createSentenceInstance(const Locale& key, UErrorCode& status)
+{
+    return createInstance(key, UBRK_SENTENCE, status);
+}
+
+// -------------------------------------
+
+// Creates a break iterator for title casing breaks.
+BreakIterator* U_EXPORT2
+BreakIterator::createTitleInstance(const Locale& key, UErrorCode& status)
+{
+    return createInstance(key, UBRK_TITLE, status);
+}
+
+// -------------------------------------
+
+// Gets all the available locales that has localized text boundary data.
+const Locale* U_EXPORT2
+BreakIterator::getAvailableLocales(int32_t& count)
+{
+    return Locale::getAvailableLocales(count);
+}
+
+// -------------------------------------
+// Gets the objectLocale display name in the default locale language.
+UnicodeString& U_EXPORT2
+BreakIterator::getDisplayName(const Locale& objectLocale,
+                             UnicodeString& name)
+{
+    return objectLocale.getDisplayName(name);
+}
+
+// -------------------------------------
+// Gets the objectLocale display name in the displayLocale language.
+UnicodeString& U_EXPORT2
+BreakIterator::getDisplayName(const Locale& objectLocale,
+                             const Locale& displayLocale,
+                             UnicodeString& name)
+{
+    return objectLocale.getDisplayName(displayLocale, name);
+}
+
+// ------------------------------------------
+//
+// Default constructor and destructor
+//
+//-------------------------------------------
+
+BreakIterator::BreakIterator()
+{
+    fBufferClone = FALSE;
+    *validLocale = *actualLocale = 0;
+}
+
+BreakIterator::~BreakIterator()
+{
+}
+
+// ------------------------------------------
+//
+// Registration
+//
+//-------------------------------------------
+#if !UCONFIG_NO_SERVICE
+
+// -------------------------------------
+
+class ICUBreakIteratorFactory : public ICUResourceBundleFactory {
+protected:
+    virtual UObject* handleCreate(const Locale& loc, int32_t kind, const ICUService* /*service*/, UErrorCode& status) const {
+        return BreakIterator::makeInstance(loc, kind, status);
+    }
+};
+
+// -------------------------------------
+
+class ICUBreakIteratorService : public ICULocaleService {
+public:
+    ICUBreakIteratorService()
+        : ICULocaleService(UNICODE_STRING("Break Iterator", 14))
+    {
+        UErrorCode status = U_ZERO_ERROR;
+        registerFactory(new ICUBreakIteratorFactory(), status);
+    }
+
+    virtual UObject* cloneInstance(UObject* instance) const {
+        return ((BreakIterator*)instance)->clone();
+    }
+
+    virtual UObject* handleDefault(const ICUServiceKey& key, UnicodeString* /*actualID*/, UErrorCode& status) const {
+        LocaleKey& lkey = (LocaleKey&)key;
+        int32_t kind = lkey.kind();
+        Locale loc;
+        lkey.currentLocale(loc);
+        return BreakIterator::makeInstance(loc, kind, status);
+    }
+
+    virtual UBool isDefault() const {
+        return countFactories() == 1;
+    }
+};
+
+// -------------------------------------
+
+U_NAMESPACE_END
+
+// defined in ucln_cmn.h
+
+static U_NAMESPACE_QUALIFIER ICULocaleService* gService = NULL;
+
+/**
+ * Release all static memory held by breakiterator.
+ */
+U_CDECL_BEGIN
+static UBool U_CALLCONV breakiterator_cleanup(void) {
+#if !UCONFIG_NO_SERVICE
+    if (gService) {
+        delete gService;
+        gService = NULL;
+    }
+#endif
+    return TRUE;
+}
+U_CDECL_END
+U_NAMESPACE_BEGIN
+
+static ICULocaleService*
+getService(void)
+{
+    UBool needsInit;
+    UMTX_CHECK(NULL, (UBool)(gService == NULL), needsInit);
+
+    if (needsInit) {
+        ICULocaleService  *tService = new ICUBreakIteratorService();
+        umtx_lock(NULL);
+        if (gService == NULL) {
+            gService = tService;
+            tService = NULL;
+            ucln_common_registerCleanup(UCLN_COMMON_BREAKITERATOR, breakiterator_cleanup);
+        }
+        umtx_unlock(NULL);
+        delete tService;
+    }
+    return gService;
+}
+
+// -------------------------------------
+
+static inline UBool
+hasService(void)
+{
+    UBool retVal;
+    UMTX_CHECK(NULL, gService != NULL, retVal);
+    return retVal;
+}
+
+// -------------------------------------
+
+URegistryKey U_EXPORT2
+BreakIterator::registerInstance(BreakIterator* toAdopt, const Locale& locale, UBreakIteratorType kind, UErrorCode& status)
+{
+    return getService()->registerInstance(toAdopt, locale, kind, status);
+}
+
+// -------------------------------------
+
+UBool U_EXPORT2
+BreakIterator::unregister(URegistryKey key, UErrorCode& status)
+{
+    if (U_SUCCESS(status)) {
+        if (hasService()) {
+            return gService->unregister(key, status);
+        }
+        status = U_ILLEGAL_ARGUMENT_ERROR;
+    }
+    return FALSE;
+}
+
+// -------------------------------------
+
+StringEnumeration* U_EXPORT2
+BreakIterator::getAvailableLocales(void)
+{
+  return getService()->getAvailableLocales();
+}
+#endif /* UCONFIG_NO_SERVICE */
+
+// -------------------------------------
+
+BreakIterator*
+BreakIterator::createInstance(const Locale& loc, int32_t kind, UErrorCode& status)
+{
+    if (U_FAILURE(status)) {
+        return NULL;
+    }
+
+    u_init(&status);
+#if !UCONFIG_NO_SERVICE
+    if (hasService()) {
+        Locale actualLoc("");
+        BreakIterator *result = (BreakIterator*)gService->get(loc, kind, &actualLoc, status);
+        // TODO: The way the service code works in ICU 2.8 is that if
+        // there is a real registered break iterator, the actualLoc
+        // will be populated, but if the handleDefault path is taken
+        // (because nothing is registered that can handle the
+        // requested locale) then the actualLoc comes back empty.  In
+        // that case, the returned object already has its actual/valid
+        // locale data populated (by makeInstance, which is what
+        // handleDefault calls), so we don't touch it.  YES, A COMMENT
+        // THIS LONG is a sign of bad code -- so the action item is to
+        // revisit this in ICU 3.0 and clean it up/fix it/remove it.
+        if (U_SUCCESS(status) && (result != NULL) && *actualLoc.getName() != 0) {
+            U_LOCALE_BASED(locBased, *result);
+            locBased.setLocaleIDs(actualLoc.getName(), actualLoc.getName());
+        }
+        return result;
+    }
+    else
+#endif
+    {
+        return makeInstance(loc, kind, status);
+    }
+}
+
+// -------------------------------------
+
+BreakIterator*
+BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
+{
+
+    if (U_FAILURE(status)) {
+        return NULL;
+    }
+
+    BreakIterator *result = NULL;
+    switch (kind) {
+    case UBRK_CHARACTER:
+        result = BreakIterator::buildInstance(loc, "grapheme", kind, status);
+        break;
+    case UBRK_WORD:
+        result = BreakIterator::buildInstance(loc, "word", kind, status);
+        break;
+    case UBRK_LINE:
+        result = BreakIterator::buildInstance(loc, "line", kind, status);
+        break;
+    case UBRK_SENTENCE:
+        result = BreakIterator::buildInstance(loc, "sentence", kind, status);
+        break;
+    case UBRK_TITLE:
+        result = BreakIterator::buildInstance(loc, "title", kind, status);
+        break;
+    default:
+        status = U_ILLEGAL_ARGUMENT_ERROR;
+    }
+
+    if (U_FAILURE(status)) {
+        return NULL;
+    }
+
+    return result;
+}
+
+Locale
+BreakIterator::getLocale(ULocDataLocaleType type, UErrorCode& status) const {
+    U_LOCALE_BASED(locBased, *this);
+    return locBased.getLocale(type, status);
+}
+
+const char *
+BreakIterator::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const {
+    U_LOCALE_BASED(locBased, *this);
+    return locBased.getLocaleID(type, status);
+}
+
+U_NAMESPACE_END
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
+
+//eof
diff --git a/source/common/caniter.cpp b/source/common/caniter.cpp
new file mode 100644
index 0000000..04d48ba
--- /dev/null
+++ b/source/common/caniter.cpp
@@ -0,0 +1,611 @@
+/*
+ *****************************************************************************
+ * Copyright (C) 1996-2006, International Business Machines Corporation and  *
+ * others. All Rights Reserved.                                              *
+ *****************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_NORMALIZATION
+
+#include "unicode/uset.h"
+#include "unicode/ustring.h"
+#include "hash.h"
+#include "unormimp.h"
+#include "unicode/caniter.h"
+#include "unicode/normlzr.h"
+#include "unicode/uchar.h"
+#include "cmemory.h"
+
+/**
+ * This class allows one to iterate through all the strings that are canonically equivalent to a given
+ * string. For example, here are some sample results:
+Results for: {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA}
+1: \u0041\u030A\u0064\u0307\u0327
+ = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA}
+2: \u0041\u030A\u0064\u0327\u0307
+ = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE}
+3: \u0041\u030A\u1E0B\u0327
+ = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA}
+4: \u0041\u030A\u1E11\u0307
+ = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE}
+5: \u00C5\u0064\u0307\u0327
+ = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA}
+6: \u00C5\u0064\u0327\u0307
+ = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE}
+7: \u00C5\u1E0B\u0327
+ = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA}
+8: \u00C5\u1E11\u0307
+ = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE}
+9: \u212B\u0064\u0307\u0327
+ = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA}
+10: \u212B\u0064\u0327\u0307
+ = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE}
+11: \u212B\u1E0B\u0327
+ = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA}
+12: \u212B\u1E11\u0307
+ = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE}
+ *<br>Note: the code is intended for use with small strings, and is not suitable for larger ones,
+ * since it has not been optimized for that situation.
+ *@author M. Davis
+ *@draft
+ */
+
+// public
+
+U_NAMESPACE_BEGIN
+
+// TODO: add boilerplate methods.
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CanonicalIterator)
+
+/**
+ *@param source string to get results for
+ */
+CanonicalIterator::CanonicalIterator(const UnicodeString &sourceStr, UErrorCode &status) :
+    pieces(NULL),
+    pieces_length(0),
+    pieces_lengths(NULL),
+    current(NULL),
+    current_length(0)
+{
+    if(U_SUCCESS(status)) {
+      setSource(sourceStr, status);
+    }
+}
+
+CanonicalIterator::~CanonicalIterator() {
+  cleanPieces();
+}
+
+void CanonicalIterator::cleanPieces() {
+    int32_t i = 0;
+    if(pieces != NULL) {
+        for(i = 0; i < pieces_length; i++) {
+            if(pieces[i] != NULL) {
+                delete[] pieces[i];
+            }
+        }
+        uprv_free(pieces);
+        pieces = NULL;
+        pieces_length = 0;
+    }
+    if(pieces_lengths != NULL) {
+        uprv_free(pieces_lengths);
+        pieces_lengths = NULL;
+    }
+    if(current != NULL) {
+        uprv_free(current);
+        current = NULL;
+        current_length = 0;
+    }
+}
+
+/**
+ *@return gets the source: NOTE: it is the NFD form of source
+ */
+UnicodeString CanonicalIterator::getSource() {
+  return source;
+}
+
+/**
+ * Resets the iterator so that one can start again from the beginning.
+ */
+void CanonicalIterator::reset() {
+    done = FALSE;
+    for (int i = 0; i < current_length; ++i) {
+        current[i] = 0;
+    }
+}
+
+/**
+ *@return the next string that is canonically equivalent. The value null is returned when
+ * the iteration is done.
+ */
+UnicodeString CanonicalIterator::next() {
+    int32_t i = 0;
+
+    if (done) {
+      buffer.setToBogus();
+      return buffer;
+    }
+
+    // delete old contents
+    buffer.remove();
+
+    // construct return value
+
+    for (i = 0; i < pieces_length; ++i) {
+        buffer.append(pieces[i][current[i]]);
+    }
+    //String result = buffer.toString(); // not needed
+
+    // find next value for next time
+
+    for (i = current_length - 1; ; --i) {
+        if (i < 0) {
+            done = TRUE;
+            break;
+        }
+        current[i]++;
+        if (current[i] < pieces_lengths[i]) break; // got sequence
+        current[i] = 0;
+    }
+    return buffer;
+}
+
+/**
+ *@param set the source string to iterate against. This allows the same iterator to be used
+ * while changing the source string, saving object creation.
+ */
+void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &status) {
+    int32_t list_length = 0;
+    UChar32 cp = 0;
+    int32_t start = 0;
+    int32_t i = 0;
+    UnicodeString *list = NULL;
+
+    Normalizer::normalize(newSource, UNORM_NFD, 0, source, status);
+    if(U_FAILURE(status)) {
+      return;
+    }
+    done = FALSE;
+
+    cleanPieces();
+
+    // catch degenerate case
+    if (newSource.length() == 0) {
+        pieces = (UnicodeString **)uprv_malloc(sizeof(UnicodeString *));
+        pieces_lengths = (int32_t*)uprv_malloc(1 * sizeof(int32_t));
+        pieces_length = 1;
+        current = (int32_t*)uprv_malloc(1 * sizeof(int32_t));
+        current_length = 1;
+        if (pieces == NULL || pieces_lengths == NULL || current == NULL) {
+            status = U_MEMORY_ALLOCATION_ERROR;
+            goto CleanPartialInitialization;
+        }
+        current[0] = 0;
+        pieces[0] = new UnicodeString[1];
+        pieces_lengths[0] = 1;
+        if (pieces[0] == 0) {
+            status = U_MEMORY_ALLOCATION_ERROR;
+            goto CleanPartialInitialization;
+        }
+        return;
+    }
+
+
+    list = new UnicodeString[source.length()];
+    if (list == 0) {
+        status = U_MEMORY_ALLOCATION_ERROR;
+        goto CleanPartialInitialization;
+    }
+
+    // i should initialy be the number of code units at the 
+    // start of the string
+    i = UTF16_CHAR_LENGTH(source.char32At(0));
+    //int32_t i = 1;
+    // find the segments
+    // This code iterates through the source string and 
+    // extracts segments that end up on a codepoint that
+    // doesn't start any decompositions. (Analysis is done
+    // on the NFD form - see above).
+    for (; i < source.length(); i += UTF16_CHAR_LENGTH(cp)) {
+        cp = source.char32At(i);
+        if (unorm_isCanonSafeStart(cp)) {
+            source.extract(start, i-start, list[list_length++]); // add up to i
+            start = i;
+        }
+    }
+    source.extract(start, i-start, list[list_length++]); // add last one
+
+
+    // allocate the arrays, and find the strings that are CE to each segment
+    pieces = (UnicodeString **)uprv_malloc(list_length * sizeof(UnicodeString *));
+    pieces_length = list_length;
+    pieces_lengths = (int32_t*)uprv_malloc(list_length * sizeof(int32_t));
+    current = (int32_t*)uprv_malloc(list_length * sizeof(int32_t));
+    current_length = list_length;
+    if (pieces == NULL || pieces_lengths == NULL || current == NULL) {
+        status = U_MEMORY_ALLOCATION_ERROR;
+        goto CleanPartialInitialization;
+    }
+
+    for (i = 0; i < current_length; i++) {
+        current[i] = 0;
+    }
+    // for each segment, get all the combinations that can produce 
+    // it after NFD normalization
+    for (i = 0; i < pieces_length; ++i) {
+        //if (PROGRESS) printf("SEGMENT\n");
+        pieces[i] = getEquivalents(list[i], pieces_lengths[i], status);
+    }
+
+    delete[] list;
+    return;
+// Common section to cleanup all local variables and reset object variables.
+CleanPartialInitialization:
+    if (list != NULL) {
+        delete[] list;
+    }
+    cleanPieces();
+}
+
+/**
+ * Dumb recursive implementation of permutation.
+ * TODO: optimize
+ * @param source the string to find permutations for
+ * @return the results in a set.
+ */
+void U_EXPORT2 CanonicalIterator::permute(UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status) {
+    if(U_FAILURE(status)) {
+        return;
+    }
+    //if (PROGRESS) printf("Permute: %s\n", UToS(Tr(source)));
+    int32_t i = 0;
+
+    // optimization:
+    // if zero or one character, just return a set with it
+    // we check for length < 2 to keep from counting code points all the time
+    if (source.length() <= 2 && source.countChar32() <= 1) {
+        UnicodeString *toPut = new UnicodeString(source);
+        /* test for NULL */
+        if (toPut == 0) {
+            status = U_MEMORY_ALLOCATION_ERROR;
+            return;
+        }
+        result->put(source, toPut, status);
+        return;
+    }
+
+    // otherwise iterate through the string, and recursively permute all the other characters
+    UChar32 cp;
+    Hashtable subpermute(status);
+    if(U_FAILURE(status)) {
+        return;
+    }
+    subpermute.setValueDeleter(uhash_deleteUnicodeString);
+
+    for (i = 0; i < source.length(); i += UTF16_CHAR_LENGTH(cp)) {
+        cp = source.char32At(i);
+        const UHashElement *ne = NULL;
+        int32_t el = -1;
+        UnicodeString subPermuteString = source;
+
+        // optimization:
+        // if the character is canonical combining class zero,
+        // don't permute it
+        if (skipZeros && i != 0 && u_getCombiningClass(cp) == 0) {
+            //System.out.println("Skipping " + Utility.hex(UTF16.valueOf(source, i)));
+            continue;
+        }
+
+        subpermute.removeAll();
+
+        // see what the permutations of the characters before and after this one are
+        //Hashtable *subpermute = permute(source.substring(0,i) + source.substring(i + UTF16.getCharCount(cp)));
+        permute(subPermuteString.replace(i, UTF16_CHAR_LENGTH(cp), NULL, 0), skipZeros, &subpermute, status);
+        /* Test for buffer overflows */
+        if(U_FAILURE(status)) {
+            return;
+        }
+        // The upper replace is destructive. The question is do we have to make a copy, or we don't care about the contents 
+        // of source at this point.
+
+        // prefix this character to all of them
+        ne = subpermute.nextElement(el);
+        while (ne != NULL) {
+            UnicodeString *permRes = (UnicodeString *)(ne->value.pointer);
+            UnicodeString *chStr = new UnicodeString(cp);
+            //test for  NULL
+            if (chStr == NULL) {
+                status = U_MEMORY_ALLOCATION_ERROR;
+                return;
+            }
+            chStr->append(*permRes); //*((UnicodeString *)(ne->value.pointer));
+            //if (PROGRESS) printf("  Piece: %s\n", UToS(*chStr));
+            result->put(*chStr, chStr, status);
+            ne = subpermute.nextElement(el);
+        }
+    }
+    //return result;
+}
+
+// privates
+
+// we have a segment, in NFD. Find all the strings that are canonically equivalent to it.
+UnicodeString* CanonicalIterator::getEquivalents(const UnicodeString &segment, int32_t &result_len, UErrorCode &status) {
+    Hashtable result(status);
+    Hashtable permutations(status);
+    Hashtable basic(status);
+    if (U_FAILURE(status)) {
+        return 0;
+    }
+    result.setValueDeleter(uhash_deleteUnicodeString);
+    permutations.setValueDeleter(uhash_deleteUnicodeString);
+    basic.setValueDeleter(uhash_deleteUnicodeString);
+
+    UChar USeg[256];
+    int32_t segLen = segment.extract(USeg, 256, status);
+    getEquivalents2(&basic, USeg, segLen, status);
+
+    // now get all the permutations
+    // add only the ones that are canonically equivalent
+    // TODO: optimize by not permuting any class zero.
+
+    const UHashElement *ne = NULL;
+    int32_t el = -1;
+    //Iterator it = basic.iterator();
+    ne = basic.nextElement(el);
+    //while (it.hasNext())
+    while (ne != NULL) {
+        //String item = (String) it.next();
+        UnicodeString item = *((UnicodeString *)(ne->value.pointer));
+
+        permutations.removeAll();
+        permute(item, CANITER_SKIP_ZEROES, &permutations, status);
+        const UHashElement *ne2 = NULL;
+        int32_t el2 = -1;
+        //Iterator it2 = permutations.iterator();
+        ne2 = permutations.nextElement(el2);
+        //while (it2.hasNext())
+        while (ne2 != NULL) {
+            //String possible = (String) it2.next();
+            //UnicodeString *possible = new UnicodeString(*((UnicodeString *)(ne2->value.pointer)));
+            UnicodeString possible(*((UnicodeString *)(ne2->value.pointer)));
+            UnicodeString attempt;
+            Normalizer::normalize(possible, UNORM_NFD, 0, attempt, status);
+
+            // TODO: check if operator == is semanticaly the same as attempt.equals(segment)
+            if (attempt==segment) {
+                //if (PROGRESS) printf("Adding Permutation: %s\n", UToS(Tr(*possible)));
+                // TODO: use the hashtable just to catch duplicates - store strings directly (somehow).
+                result.put(possible, new UnicodeString(possible), status); //add(possible);
+            } else {
+                //if (PROGRESS) printf("-Skipping Permutation: %s\n", UToS(Tr(*possible)));
+            }
+
+            ne2 = permutations.nextElement(el2);
+        }
+        ne = basic.nextElement(el);
+    }
+
+    /* Test for buffer overflows */
+    if(U_FAILURE(status)) {
+        return 0;
+    }
+    // convert into a String[] to clean up storage
+    //String[] finalResult = new String[result.size()];
+    UnicodeString *finalResult = NULL;
+    int32_t resultCount;
+    if((resultCount = result.count())) {
+        finalResult = new UnicodeString[resultCount];
+        if (finalResult == 0) {
+            status = U_MEMORY_ALLOCATION_ERROR;
+            return NULL;
+        }
+    }
+    else {
+        status = U_ILLEGAL_ARGUMENT_ERROR;
+        return NULL;
+    }
+    //result.toArray(finalResult);
+    result_len = 0;
+    el = -1;
+    ne = result.nextElement(el);
+    while(ne != NULL) {
+        finalResult[result_len++] = *((UnicodeString *)(ne->value.pointer));
+        ne = result.nextElement(el);
+    }
+
+
+    return finalResult;
+}
+
+Hashtable *CanonicalIterator::getEquivalents2(Hashtable *fillinResult, const UChar *segment, int32_t segLen, UErrorCode &status) {
+
+    if (U_FAILURE(status)) {
+        return NULL;
+    }
+
+    //if (PROGRESS) printf("Adding: %s\n", UToS(Tr(segment)));
+
+    UnicodeString toPut(segment, segLen);
+
+    fillinResult->put(toPut, new UnicodeString(toPut), status);
+
+    USerializedSet starts;
+
+    // cycle through all the characters
+    UChar32 cp, end = 0;
+    int32_t i = 0, j;
+    for (i = 0; i < segLen; i += UTF16_CHAR_LENGTH(cp)) {
+        // see if any character is at the start of some decomposition
+        UTF_GET_CHAR(segment, 0, i, segLen, cp);
+        if (!unorm_getCanonStartSet(cp, &starts)) {
+            continue;
+        }
+        // if so, see which decompositions match 
+        for(j = 0, cp = end+1; cp <= end || uset_getSerializedRange(&starts, j++, &cp, &end); ++cp) {
+            Hashtable remainder(status);
+            remainder.setValueDeleter(uhash_deleteUnicodeString);
+            if (extract(&remainder, cp, segment, segLen, i, status) == NULL) {
+                continue;
+            }
+
+            // there were some matches, so add all the possibilities to the set.
+            UnicodeString prefix(segment, i);
+            prefix += cp;
+
+            int32_t el = -1;
+            const UHashElement *ne = remainder.nextElement(el);
+            while (ne != NULL) {
+                UnicodeString item = *((UnicodeString *)(ne->value.pointer));
+                UnicodeString *toAdd = new UnicodeString(prefix);
+                /* test for NULL */
+                if (toAdd == 0) {
+                    status = U_MEMORY_ALLOCATION_ERROR;
+                    return NULL;
+                }
+                *toAdd += item;
+                fillinResult->put(*toAdd, toAdd, status);
+
+                //if (PROGRESS) printf("Adding: %s\n", UToS(Tr(*toAdd)));
+
+                ne = remainder.nextElement(el);
+            }
+        }
+    }
+
+    /* Test for buffer overflows */
+    if(U_FAILURE(status)) {
+        return NULL;
+    }
+    return fillinResult;
+}
+
+/**
+ * See if the decomposition of cp2 is at segment starting at segmentPos 
+ * (with canonical rearrangment!)
+ * If so, take the remainder, and return the equivalents 
+ */
+Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, const UChar *segment, int32_t segLen, int32_t segmentPos, UErrorCode &status) {
+//Hashtable *CanonicalIterator::extract(UChar32 comp, const UnicodeString &segment, int32_t segLen, int32_t segmentPos, UErrorCode &status) {
+    //if (PROGRESS) printf(" extract: %s, ", UToS(Tr(UnicodeString(comp))));
+    //if (PROGRESS) printf("%s, %i\n", UToS(Tr(segment)), segmentPos);
+
+    if (U_FAILURE(status)) {
+        return NULL;
+    }
+
+    const int32_t bufSize = 256;
+    int32_t bufLen = 0;
+    UChar temp[bufSize];
+
+    int32_t inputLen = 0, decompLen;
+    UChar stackBuffer[4];
+    const UChar *decomp;
+
+    U16_APPEND_UNSAFE(temp, inputLen, comp);
+    decomp = unorm_getCanonicalDecomposition(comp, stackBuffer, &decompLen);
+    if(decomp == NULL) {
+        /* copy temp */
+        stackBuffer[0] = temp[0];
+        if(inputLen > 1) {
+            stackBuffer[1] = temp[1];
+        }
+        decomp = stackBuffer;
+        decompLen = inputLen;
+    }
+
+    UChar *buff = temp+inputLen;
+
+    // See if it matches the start of segment (at segmentPos)
+    UBool ok = FALSE;
+    UChar32 cp;
+    int32_t decompPos = 0;
+    UChar32 decompCp;
+    UTF_NEXT_CHAR(decomp, decompPos, decompLen, decompCp);
+
+    int32_t i;
+    UBool overflow = FALSE;
+
+    i = segmentPos;
+    while(i < segLen) {
+        UTF_NEXT_CHAR(segment, i, segLen, cp);
+
+        if (cp == decompCp) { // if equal, eat another cp from decomp
+
+            //if (PROGRESS) printf("  matches: %s\n", UToS(Tr(UnicodeString(cp))));
+
+            if (decompPos == decompLen) { // done, have all decomp characters!
+                //u_strcat(buff+bufLen, segment+i);
+                uprv_memcpy(buff+bufLen, segment+i, (segLen-i)*sizeof(UChar));
+                bufLen+=segLen-i;
+
+                ok = TRUE;
+                break;
+            }
+            UTF_NEXT_CHAR(decomp, decompPos, decompLen, decompCp);
+        } else {
+            //if (PROGRESS) printf("  buffer: %s\n", UToS(Tr(UnicodeString(cp))));
+
+            // brute force approach
+
+            U16_APPEND(buff, bufLen, bufSize, cp, overflow);
+
+            if(overflow) {
+                /*
+                 * ### TODO handle buffer overflow
+                 * The buffer is large, but an overflow may still happen with
+                 * unusual input (many combining marks?).
+                 * Reallocate buffer and continue.
+                 * markus 20020929
+                 */
+
+                overflow = FALSE;
+            }
+
+            /* TODO: optimize
+            // since we know that the classes are monotonically increasing, after zero
+            // e.g. 0 5 7 9 0 3
+            // we can do an optimization
+            // there are only a few cases that work: zero, less, same, greater
+            // if both classes are the same, we fail
+            // if the decomp class < the segment class, we fail
+
+            segClass = getClass(cp);
+            if (decompClass <= segClass) return null;
+            */
+        }
+    }
+    if (!ok)
+        return NULL; // we failed, characters left over
+
+    //if (PROGRESS) printf("Matches\n");
+
+    if (bufLen == 0) {
+        fillinResult->put(UnicodeString(), new UnicodeString(), status);
+        return fillinResult; // succeed, but no remainder
+    }
+
+    // brute force approach
+    // check to make sure result is canonically equivalent
+    int32_t tempLen = inputLen + bufLen;
+
+    UChar trial[bufSize];
+    unorm_decompose(trial, bufSize, temp, tempLen, FALSE, 0, &status);
+
+    if(U_FAILURE(status)
+        || uprv_memcmp(segment+segmentPos, trial, (segLen - segmentPos)*sizeof(UChar)) != 0)
+    {
+        return NULL;
+    }
+
+    return getEquivalents2(fillinResult, buff, bufLen, status);
+}
+
+U_NAMESPACE_END
+
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
diff --git a/source/common/chariter.cpp b/source/common/chariter.cpp
new file mode 100644
index 0000000..a598bd6
--- /dev/null
+++ b/source/common/chariter.cpp
@@ -0,0 +1,96 @@
+/*
+**********************************************************************
+*   Copyright (C) 1999-2004, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+**********************************************************************
+*/
+
+#include "unicode/chariter.h"
+
+U_NAMESPACE_BEGIN
+
+ForwardCharacterIterator::~ForwardCharacterIterator() {}
+ForwardCharacterIterator::ForwardCharacterIterator()
+: UObject()
+{}
+ForwardCharacterIterator::ForwardCharacterIterator(const ForwardCharacterIterator &other)
+: UObject(other)
+{}
+
+
+CharacterIterator::CharacterIterator()
+: textLength(0), pos(0), begin(0), end(0) {
+}
+
+CharacterIterator::CharacterIterator(int32_t length)
+: textLength(length), pos(0), begin(0), end(length) {
+    if(textLength < 0) {
+        textLength = end = 0;
+    }
+}
+
+CharacterIterator::CharacterIterator(int32_t length, int32_t position)
+: textLength(length), pos(position), begin(0), end(length) {
+    if(textLength < 0) {
+        textLength = end = 0;
+    }
+    if(pos < 0) {
+        pos = 0;
+    } else if(pos > end) {
+        pos = end;
+    }
+}
+
+CharacterIterator::CharacterIterator(int32_t length, int32_t textBegin, int32_t textEnd, int32_t position)
+: textLength(length), pos(position), begin(textBegin), end(textEnd) {
+    if(textLength < 0) {
+        textLength = 0;
+    }
+    if(begin < 0) {
+        begin = 0;
+    } else if(begin > textLength) {
+        begin = textLength;
+    }
+    if(end < begin) {
+        end = begin;
+    } else if(end > textLength) {
+        end = textLength;
+    }
+    if(pos < begin) {
+        pos = begin;
+    } else if(pos > end) {
+        pos = end;
+    }
+}
+
+CharacterIterator::CharacterIterator(const CharacterIterator &that) :
+ForwardCharacterIterator(that),
+textLength(that.textLength), pos(that.pos), begin(that.begin), end(that.end)
+{
+}
+
+CharacterIterator &
+CharacterIterator::operator=(const CharacterIterator &that) {
+    ForwardCharacterIterator::operator=(that);
+    textLength = that.textLength;
+    pos = that.pos;
+    begin = that.begin;
+    end = that.end;
+    return *this;
+}
+
+// implementing first[32]PostInc() directly in a subclass should be faster
+// but these implementations make subclassing a little easier
+UChar
+CharacterIterator::firstPostInc(void) {
+    setToStart();
+    return nextPostInc();
+}
+
+UChar32
+CharacterIterator::first32PostInc(void) {
+    setToStart();
+    return next32PostInc();
+}
+
+U_NAMESPACE_END
diff --git a/source/common/charstr.h b/source/common/charstr.h
new file mode 100644
index 0000000..3bb11cb
--- /dev/null
+++ b/source/common/charstr.h
@@ -0,0 +1,88 @@
+/*
+**********************************************************************
+*   Copyright (c) 2001-2004, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+**********************************************************************
+*   Date        Name        Description
+*   11/19/2001  aliu        Creation.
+**********************************************************************
+*/
+
+#ifndef CHARSTRING_H
+#define CHARSTRING_H
+
+#include "unicode/utypes.h"
+#include "unicode/uobject.h"
+#include "unicode/unistr.h"
+#include "cmemory.h"
+
+//--------------------------------------------------------------------
+// class CharString
+//
+// This is a tiny wrapper class that is used internally to make a
+// UnicodeString look like a const char*.  It can be allocated on the
+// stack.  It only creates a heap buffer if it needs to.
+//--------------------------------------------------------------------
+
+U_NAMESPACE_BEGIN
+
+class U_COMMON_API CharString : public UMemory {
+public:
+
+#if !UCONFIG_NO_CONVERSION
+    // Constructor
+    //     @param  str    The unicode string to be converted to char *
+    //     @param  codepage   The char * code page.  ""   for invariant conversion.
+    //                                               NULL for default code page.
+//    inline CharString(const UnicodeString& str, const char *codepage);
+#endif
+
+    inline CharString(const UnicodeString& str);
+    inline ~CharString();
+    inline operator const char*() const { return ptr; }
+
+private:
+    char buf[128];
+    char* ptr;
+
+    CharString(const CharString &other); // forbid copying of this class
+    CharString &operator=(const CharString &other); // forbid copying of this class
+};
+
+#if !UCONFIG_NO_CONVERSION
+
+// PLEASE DON'T USE THIS FUNCTION.
+// We don't want the static dependency on conversion or the performance hit that comes from a codepage conversion.
+/*
+inline CharString::CharString(const UnicodeString& str, const char *codepage) {
+    int32_t    len;
+    ptr = buf;
+    len = str.extract(0, 0x7FFFFFFF, buf ,sizeof(buf)-1, codepage);
+    if (len >= (int32_t)(sizeof(buf)-1)) {
+        ptr = (char *)uprv_malloc(len+1);
+        str.extract(0, 0x7FFFFFFF, ptr, len+1, codepage);
+    }
+}*/
+
+#endif
+
+inline CharString::CharString(const UnicodeString& str) {
+    int32_t    len;
+    ptr = buf;
+    len = str.extract(0, 0x7FFFFFFF, buf, (int32_t)(sizeof(buf)-1), US_INV);
+    if (len >= (int32_t)(sizeof(buf)-1)) {
+        ptr = (char *)uprv_malloc(len+1);
+        str.extract(0, 0x7FFFFFFF, ptr, len+1, US_INV);
+    }
+}
+
+inline CharString::~CharString() {
+    if (ptr != buf) {
+        uprv_free(ptr);
+    }
+}
+
+U_NAMESPACE_END
+
+#endif
+//eof
diff --git a/source/common/cmemory.c b/source/common/cmemory.c
new file mode 100644
index 0000000..0f93f36
--- /dev/null
+++ b/source/common/cmemory.c
@@ -0,0 +1,124 @@
+/*
+******************************************************************************
+*
+*   Copyright (C) 2002-2003, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*
+* File cmemory.c      ICU Heap allocation.
+*                     All ICU heap allocation, both for C and C++ new of ICU
+*                     class types, comes through these functions.
+*
+*                     If you have a need to replace ICU allocation, this is the
+*                     place to do it.
+*
+*                     Note that uprv_malloc(0) returns a non-NULL pointer, and
+*                     that a subsequent free of that pointer value is a NOP.
+*
+******************************************************************************
+*/
+#include "unicode/uclean.h"
+#include "cmemory.h"
+#include <stdlib.h>
+
+/* uprv_malloc(0) returns a pointer to this read-only data. */                
+static const int32_t zeroMem[] = {0, 0, 0, 0, 0, 0};
+
+/* Function Pointers for user-supplied heap functions  */
+static const void     *pContext;
+static UMemAllocFn    *pAlloc;
+static UMemReallocFn  *pRealloc;
+static UMemFreeFn     *pFree;
+
+/* Flag indicating whether any heap allocations have happened.
+ *   Used to prevent changing out the heap functions after allocations have been made */
+static UBool   gHeapInUse;
+
+U_CAPI void * U_EXPORT2
+uprv_malloc(size_t s) {
+    if (s > 0) {
+        gHeapInUse = TRUE;
+        if (pAlloc) {
+            return (*pAlloc)(pContext, s);
+        } else {
+            return malloc(s);
+        }
+    } else {
+        return (void *)zeroMem;
+    }
+}
+
+U_CAPI void * U_EXPORT2
+uprv_realloc(void * buffer, size_t size) {
+    if (buffer == zeroMem) {
+        return uprv_malloc(size);
+    } else if (size == 0) {
+        if (pFree) {
+            (*pFree)(pContext, buffer);
+        } else {
+            free(buffer);
+        }
+        return (void *)zeroMem;
+    } else {
+        gHeapInUse = TRUE;
+        if (pRealloc) {
+            return (*pRealloc)(pContext, buffer, size);
+        } else {
+            return realloc(buffer, size);
+        }
+    }
+}
+
+U_CAPI void U_EXPORT2
+uprv_free(void *buffer) {
+    if (buffer != zeroMem) {
+        if (pFree) {
+            (*pFree)(pContext, buffer);
+        } else {
+            free(buffer);
+        }
+    }
+}
+
+U_CAPI void U_EXPORT2
+u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f,  UErrorCode *status)
+{
+    if (U_FAILURE(*status)) {
+        return;
+    }
+    if (a==NULL || r==NULL || f==NULL) {
+        *status = U_ILLEGAL_ARGUMENT_ERROR;
+        return;
+    }
+    if (gHeapInUse) {
+        *status = U_INVALID_STATE_ERROR;
+        return;
+    }
+    pContext  = context;
+    pAlloc    = a;
+    pRealloc  = r;
+    pFree     = f;
+}
+
+
+U_CFUNC UBool cmemory_cleanup(void) {
+    pContext   = NULL;
+    pAlloc     = NULL;
+    pRealloc   = NULL;
+    pFree      = NULL;
+    gHeapInUse = FALSE;
+    return TRUE;
+}
+
+
+/*
+ *   gHeapInUse
+ *       Return True if ICU has allocated any memory.
+ *       Used by u_SetMutexFunctions() and similar to verify that ICU has not
+ *               been used, that it is in a pristine initial state.
+ */
+U_CFUNC UBool cmemory_inUse() {
+    return gHeapInUse;
+}
+
diff --git a/source/common/cmemory.h b/source/common/cmemory.h
new file mode 100644
index 0000000..da65d7c
--- /dev/null
+++ b/source/common/cmemory.h
@@ -0,0 +1,82 @@
+/*
+******************************************************************************
+*
+*   Copyright (C) 1997-2003, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*
+* File CMEMORY.H
+*
+*  Contains stdlib.h/string.h memory functions
+*
+* @author       Bertrand A. Damiba
+*
+* Modification History:
+*
+*   Date        Name        Description
+*   6/20/98     Bertrand    Created.
+*  05/03/99     stephen     Changed from functions to macros.
+*
+******************************************************************************
+*/
+
+#ifndef CMEMORY_H
+#define CMEMORY_H
+
+#include "unicode/utypes.h"
+#include <string.h>
+
+
+#define uprv_memcpy(dst, src, size) U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size)
+#define uprv_memmove(dst, src, size) U_STANDARD_CPP_NAMESPACE memmove(dst, src, size)
+#define uprv_memset(buffer, mark, size) U_STANDARD_CPP_NAMESPACE memset(buffer, mark, size)
+#define uprv_memcmp(buffer1, buffer2, size) U_STANDARD_CPP_NAMESPACE memcmp(buffer1, buffer2,size)
+
+U_CAPI void * U_EXPORT2
+uprv_malloc(size_t s);
+
+U_CAPI void * U_EXPORT2
+uprv_realloc(void *mem, size_t size);
+
+U_CAPI void U_EXPORT2
+uprv_free(void *mem);
+
+/**
+ * This should align the memory properly on any machine.
+ * This is very useful for the safeClone functions.
+ */
+typedef union {
+    long    t1;
+    double  t2;
+    void   *t3;
+} UAlignedMemory;
+
+/**
+ * Get the amount of bytes that a pointer is off by from
+ * the previous aligned pointer
+ */
+#define U_ALIGNMENT_OFFSET(ptr) (((size_t)ptr) & (sizeof(UAlignedMemory) - 1))
+
+/**
+ * Get the amount of bytes to add to a pointer
+ * in order to get the next aligned address
+ */
+#define U_ALIGNMENT_OFFSET_UP(ptr) (sizeof(UAlignedMemory) - U_ALIGNMENT_OFFSET(ptr))
+
+/**
+  *  Indicate whether the ICU allocation functions have been used.
+  *  This is used to determine whether ICU is in an initial, unused state.
+  */
+U_CFUNC UBool 
+cmemory_inUse(void);
+
+/**
+  *  Heap clean up function, called from u_cleanup()
+  *    Clears any user heap functions from u_setMemoryFunctions()
+  *    Does NOT deallocate any remaining allocated memory.
+  */
+U_CFUNC UBool 
+cmemory_cleanup(void);
+
+#endif
diff --git a/source/common/common.rc b/source/common/common.rc
new file mode 100644
index 0000000..331e542
--- /dev/null
+++ b/source/common/common.rc
@@ -0,0 +1,108 @@
+// Do not edit with Microsoft Developer Studio Resource Editor.
+//   It will permanently substitute version numbers that are intended to be
+//   picked up by the pre-processor during each build.
+// Copyright (c) 2001-2005 International Business Machines
+// Corporation and others. All Rights Reserved.
+//
+#include "msvcres.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <winresrc.h>
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// 
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#pragma code_page(1252)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "msvcres.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include <winresrc.h>\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+#define STR(s) #s
+#define CommaVersionString(a, b, c, d) STR(a) ", " STR(b) ", " STR(c) ", " STR(d) "\0"
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM, U_ICU_VERSION_PATCHLEVEL_NUM, 0
+ PRODUCTVERSION U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM, U_ICU_VERSION_PATCHLEVEL_NUM, 0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "00000000"
+        BEGIN
+            VALUE "Comments", ICU_WEBSITE "\0"
+            VALUE "CompanyName", "IBM Corporation and others\0"
+            VALUE "FileDescription", "IBM ICU Common DLL\0"
+            VALUE "FileVersion",  CommaVersionString(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM, U_ICU_VERSION_PATCHLEVEL_NUM, 0)
+            VALUE "LegalCopyright", U_COPYRIGHT_STRING "\0"
+#ifdef _DEBUG
+            VALUE "OriginalFilename", "icuuc" U_ICU_VERSION_SHORT "d.dll\0")
+#else
+            VALUE "OriginalFilename", "icuuc" U_ICU_VERSION_SHORT ".dll\0")
+#endif
+            VALUE "PrivateBuild", "\0"
+            VALUE "ProductName", "International Components for Unicode\0"
+            VALUE "ProductVersion", CommaVersionString(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM, U_ICU_VERSION_PATCHLEVEL_NUM, 0)
+            VALUE "SpecialBuild", "\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x000, 0000
+    END
+END
+
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/source/common/common.vcproj b/source/common/common.vcproj
new file mode 100644
index 0000000..d8d6510
--- /dev/null
+++ b/source/common/common.vcproj
@@ -0,0 +1,2588 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="common"
+	ProjectGUID="{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\..\..\lib"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\..\..\lib\icuuc.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;U_COMMON_IMPLEMENTATION"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				DisableLanguageExtensions="true"
+				TreatWChar_tAsBuiltInType="true"
+				PrecompiledHeaderFile=".\Release/common.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="..\..\bin\icuuc38.dll"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile=".\..\..\lib\icuuc38.pdb"
+				EnableCOMDATFolding="2"
+				BaseAddress="0x4a800000"
+				ImportLibrary="..\..\lib\icuuc.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\..\..\lib"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\..\..\lib\icuucd.tlb"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;U_COMMON_IMPLEMENTATION;RBBI_DEBUG"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="true"
+				DisableLanguageExtensions="true"
+				TreatWChar_tAsBuiltInType="true"
+				PrecompiledHeaderFile=".\Debug/common.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="..\..\bin\icuuc38d.dll"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\..\..\lib\icuuc38d.pdb"
+				BaseAddress="0x4a800000"
+				ImportLibrary="..\..\lib\icuucd.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				UseFAT32Workaround="true"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="bidi"
+			>
+			<File
+				RelativePath=".\ubidi.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ubidi.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ubidi_props.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ubidi_props.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ubidiimp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ubidiln.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ubidiwrt.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ushape.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ushape.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="break iteration"
+			>
+			<File
+				RelativePath=".\brkeng.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\brkeng.h"
+				>
+			</File>
+			<File
+				RelativePath=".\brkiter.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\brkiter.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\dbbi.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\dictbe.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\dictbe.h"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbi.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\rbbi.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\rbbidata.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbidata.h"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbinode.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbinode.h"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbirb.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbirb.h"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbirpt.h"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbiscan.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbiscan.h"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbisetb.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbisetb.h"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbistbl.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbitblb.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\rbbitblb.h"
+				>
+			</File>
+			<File
+				RelativePath=".\triedict.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\triedict.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ubrk.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ubrk.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ubrkimpl.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="collation"
+			>
+			<File
+				RelativePath=".\ucol_swp.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="..\i18n"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="..\i18n"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ucol_swp.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="collections"
+			>
+			<File
+				RelativePath=".\hash.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\strenum.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uarrsort.c"
+				>
+			</File>
+			<File
+				RelativePath=".\uarrsort.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uenum.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uenum.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uenumimp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uhash.c"
+				>
+			</File>
+			<File
+				RelativePath=".\uhash.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uhash_us.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\ustack.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\ustrenum.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\ustrenum.h"
+				>
+			</File>
+			<File
+				RelativePath=".\utrie.c"
+				>
+			</File>
+			<File
+				RelativePath=".\utrie.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uvector.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\uvector.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uvectr32.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\uvectr32.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="configuration"
+			>
+			<File
+				RelativePath=".\common.rc"
+				>
+			</File>
+			<File
+				RelativePath=".\cpputils.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\docmain.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\locmap.c"
+				>
+			</File>
+			<File
+				RelativePath=".\locmap.h"
+				>
+			</File>
+			<File
+				RelativePath=".\mutex.h"
+				>
+			</File>
+			<File
+				RelativePath=".\putil.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						DisableLanguageExtensions="false"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						DisableLanguageExtensions="false"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\putil.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\putilimp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\pwin32.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uassert.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uconfig.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\udeprctd.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\udraft.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\uintrnal.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\umachine.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\umath.c"
+				>
+			</File>
+			<File
+				RelativePath=".\umutex.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						DisableLanguageExtensions="false"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						DisableLanguageExtensions="false"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\umutex.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uobslete.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\urename.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\usystem.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\utrace.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\utrace.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\utracimp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\utypes.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\utypes.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\uversion.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\wintz.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						DisableLanguageExtensions="false"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						DisableLanguageExtensions="false"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\wintz.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="conversion"
+			>
+			<File
+				RelativePath=".\ucnv.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ucnv.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ucnv2022.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_bld.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_bld.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_cb.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ucnv_cb.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ucnv_cnv.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_cnv.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_err.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ucnv_err.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ucnv_ext.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_ext.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_imp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_io.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_io.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_lmb.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_set.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_u16.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_u32.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_u7.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnv_u8.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnvbocu.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnvdisp.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnvhz.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnvisci.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnvlat1.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnvmbcs.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnvmbcs.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ucnvscsu.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="data &amp; memory"
+			>
+			<File
+				RelativePath=".\cmemory.c"
+				>
+			</File>
+			<File
+				RelativePath=".\cmemory.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uclean.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ucln.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ucln_cmn.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucln_cmn.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ucmndata.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucmndata.h"
+				>
+			</File>
+			<File
+				RelativePath=".\udata.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\udata.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\udatamem.c"
+				>
+			</File>
+			<File
+				RelativePath=".\udatamem.h"
+				>
+			</File>
+			<File
+				RelativePath=".\udataswp.c"
+				>
+			</File>
+			<File
+				RelativePath=".\udataswp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uinit.c"
+				>
+			</File>
+			<File
+				RelativePath=".\umapfile.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						DisableLanguageExtensions="false"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						DisableLanguageExtensions="false"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\umapfile.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uobject.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uobject.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="formatting"
+			>
+			<File
+				RelativePath=".\unicode\parseerr.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\parsepos.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\parsepos.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\umisc.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ustrfmt.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ustrfmt.h"
+				>
+			</File>
+			<File
+				RelativePath=".\util.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\util.h"
+				>
+			</File>
+			<File
+				RelativePath=".\util_props.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="idna"
+			Filter="*.c,*.h"
+			>
+			<File
+				RelativePath=".\punycode.c"
+				>
+			</File>
+			<File
+				RelativePath=".\punycode.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uidna.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uidna.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="locales &amp; resources"
+			>
+			<File
+				RelativePath=".\locbased.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\locbased.h"
+				>
+			</File>
+			<File
+				RelativePath=".\locid.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\locid.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\locutil.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\locutil.h"
+				>
+			</File>
+			<File
+				RelativePath=".\resbund.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\resbund.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\resbund_cnv.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\ucat.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ucat.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uloc.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uloc.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ulocimp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ures.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ures_cnv.c"
+				>
+			</File>
+			<File
+				RelativePath=".\uresbund.c"
+				>
+			</File>
+			<File
+				RelativePath=".\uresdata.c"
+				>
+			</File>
+			<File
+				RelativePath=".\uresdata.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uresimp.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="normalization"
+			>
+			<File
+				RelativePath=".\caniter.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\caniter.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\normlzr.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\normlzr.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unorm.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\unorm.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unorm_it.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unorm_it.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unormcmp.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unormimp.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="properties &amp; sets"
+			>
+			<File
+				RelativePath=".\bmpset.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\bmpset.h"
+				>
+			</File>
+			<File
+				RelativePath=".\propname.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\propname.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ruleiter.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\ruleiter.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\symtable.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ucase.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ucase.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uchar.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uchar.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unames.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unifilt.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\unifilt.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unifunct.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\unifunct.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\unimatch.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uniset.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uniset.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uniset_props.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unisetspan.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unisetspan.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uprops.c"
+				>
+			</File>
+			<File
+				RelativePath=".\uprops.h"
+				>
+			</File>
+			<File
+				RelativePath=".\usc_impl.c"
+				>
+			</File>
+			<File
+				RelativePath=".\usc_impl.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uscript.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uscript.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uset.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uset.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uset_imp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uset_props.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\usetiter.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\usetiter.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="registration"
+			>
+			<File
+				RelativePath=".\serv.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\serv.h"
+				>
+			</File>
+			<File
+				RelativePath=".\servlk.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\servlkf.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\servloc.h"
+				>
+			</File>
+			<File
+				RelativePath=".\servls.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\servnotf.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\servnotf.h"
+				>
+			</File>
+			<File
+				RelativePath=".\servrbf.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\servslkf.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="sprep"
+			>
+			<File
+				RelativePath=".\sprpimpl.h"
+				>
+			</File>
+			<File
+				RelativePath=".\usprep.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\usprep.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="strings"
+			>
+			<File
+				RelativePath=".\chariter.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\chariter.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\charstr.h"
+				>
+			</File>
+			<File
+				RelativePath=".\cstring.c"
+				>
+			</File>
+			<File
+				RelativePath=".\cstring.h"
+				>
+			</File>
+			<File
+				RelativePath=".\cwchar.c"
+				>
+			</File>
+			<File
+				RelativePath=".\cwchar.h"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\rep.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\schriter.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\schriter.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ucasemap.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ucasemap.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uchriter.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uchriter.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\uinvchar.c"
+				>
+			</File>
+			<File
+				RelativePath=".\uinvchar.h"
+				>
+			</File>
+			<File
+				RelativePath=".\uiter.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\uiter.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unistr.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\unistr.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unistr_case.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unistr_cnv.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unistr_props.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\urep.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ustr_cnv.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ustr_cnv.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ustr_imp.h"
+				>
+			</File>
+			<File
+				RelativePath=".\ustr_wcs.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ustrcase.c"
+				>
+			</File>
+			<File
+				RelativePath=".\ustring.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\ustring.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\ustrtrns.c"
+				>
+			</File>
+			<File
+				RelativePath=".\utext.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\utext.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\utf.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\utf16.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\utf32.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\unicode\utf8.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\utf_impl.c"
+				>
+			</File>
+			<File
+				RelativePath=".\unicode\utf_old.h"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCustomBuildTool"
+						CommandLine="copy &quot;$(InputPath)&quot; ..\..\include\unicode&#x0D;&#x0A;"
+						Outputs="..\..\include\unicode\$(InputFileName)"
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/source/common/cpputils.h b/source/common/cpputils.h
new file mode 100644
index 0000000..c1b439c
--- /dev/null
+++ b/source/common/cpputils.h
@@ -0,0 +1,84 @@
+/*
+******************************************************************************
+*
+*   Copyright (C) 1997-2006, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*   file name:  cpputils.h
+*   encoding:   US-ASCII
+*   tab size:   8 (not used)
+*   indentation:4
+*/
+
+#ifndef CPPUTILS_H
+#define CPPUTILS_H
+
+#include "unicode/utypes.h"
+#include "unicode/unistr.h"
+#include "cmemory.h"
+
+/*==========================================================================*/
+/* Array copy utility functions */
+/*==========================================================================*/
+
+static
+inline void uprv_arrayCopy(const double* src, double* dst, int32_t count)
+{ uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); }
+
+static
+inline void uprv_arrayCopy(const double* src, int32_t srcStart,
+              double* dst, int32_t dstStart, int32_t count)
+{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
+
+static
+inline void uprv_arrayCopy(const int8_t* src, int8_t* dst, int32_t count)
+    { uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); }
+
+static
+inline void uprv_arrayCopy(const int8_t* src, int32_t srcStart,
+              int8_t* dst, int32_t dstStart, int32_t count)
+{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
+
+static
+inline void uprv_arrayCopy(const int16_t* src, int16_t* dst, int32_t count)
+{ uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); }
+
+static
+inline void uprv_arrayCopy(const int16_t* src, int32_t srcStart,
+              int16_t* dst, int32_t dstStart, int32_t count)
+{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
+
+static
+inline void uprv_arrayCopy(const int32_t* src, int32_t* dst, int32_t count)
+{ uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); }
+
+static
+inline void uprv_arrayCopy(const int32_t* src, int32_t srcStart,
+              int32_t* dst, int32_t dstStart, int32_t count)
+{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
+
+static
+inline void
+uprv_arrayCopy(const UChar *src, int32_t srcStart,
+        UChar *dst, int32_t dstStart, int32_t count)
+{ uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
+
+/**
+ * Copy an array of UnicodeString OBJECTS (not pointers).
+ * @internal
+ */
+static inline void
+uprv_arrayCopy(const U_NAMESPACE_QUALIFIER UnicodeString *src, U_NAMESPACE_QUALIFIER UnicodeString *dst, int32_t count)
+{ while(count-- > 0) *dst++ = *src++; }
+
+/**
+ * Copy an array of UnicodeString OBJECTS (not pointers).
+ * @internal
+ */
+static inline void
+uprv_arrayCopy(const U_NAMESPACE_QUALIFIER UnicodeString *src, int32_t srcStart,
+        U_NAMESPACE_QUALIFIER UnicodeString *dst, int32_t dstStart, int32_t count)
+{ uprv_arrayCopy(src+srcStart, dst+dstStart, count); }
+
+#endif /* _CPPUTILS */
diff --git a/source/common/cstring.c b/source/common/cstring.c
new file mode 100644
index 0000000..a5b2c6b
--- /dev/null
+++ b/source/common/cstring.c
@@ -0,0 +1,328 @@
+/*
+******************************************************************************
+*
+*   Copyright (C) 1997-2003, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*
+* File CSTRING.C
+*
+* @author       Helena Shih
+*
+* Modification History:
+*
+*   Date        Name        Description
+*   6/18/98     hshih       Created
+*   09/08/98    stephen     Added include for ctype, for Mac Port
+*   11/15/99    helena      Integrated S/390 IEEE changes. 
+******************************************************************************
+*/
+
+
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "unicode/utypes.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "uassert.h"
+
+/*
+ * We hardcode case conversion for invariant characters to match our expectation
+ * and the compiler execution charset.
+ * This prevents problems on systems
+ * - with non-default casing behavior, like Turkish system locales where
+ *   tolower('I') maps to dotless i and toupper('i') maps to dotted I
+ * - where there are no lowercase Latin characters at all, or using different
+ *   codes (some old EBCDIC codepages)
+ *
+ * This works because the compiler usually runs on a platform where the execution
+ * charset includes all of the invariant characters at their expected
+ * code positions, so that the char * string literals in ICU code match
+ * the char literals here.
+ *
+ * Note that the set of lowercase Latin letters is discontiguous in EBCDIC
+ * and the set of uppercase Latin letters is discontiguous as well.
+ */
+
+U_CAPI char U_EXPORT2
+uprv_toupper(char c) {
+#if U_CHARSET_FAMILY==U_EBCDIC_FAMILY
+    if(('a'<=c && c<='i') || ('j'<=c && c<='r') || ('s'<=c && c<='z')) {
+        c=(char)(c+('A'-'a'));
+    }
+#else
+    if('a'<=c && c<='z') {
+        c=(char)(c+('A'-'a'));
+    }
+#endif
+    return c;
+}
+
+
+#if 0
+/*
+ * Commented out because cstring.h defines uprv_tolower() to be
+ * the same as either uprv_asciitolower() or uprv_ebcdictolower()
+ * to reduce the amount of code to cover with tests.
+ *
+ * Note that this uprv_tolower() definition is likely to work for most
+ * charset families, not just ASCII and EBCDIC, because its #else branch
+ * is written generically.
+ */
+U_CAPI char U_EXPORT2
+uprv_tolower(char c) {
+#if U_CHARSET_FAMILY==U_EBCDIC_FAMILY
+    if(('A'<=c && c<='I') || ('J'<=c && c<='R') || ('S'<=c && c<='Z')) {
+        c=(char)(c+('a'-'A'));
+    }
+#else
+    if('A'<=c && c<='Z') {
+        c=(char)(c+('a'-'A'));
+    }
+#endif
+    return c;
+}
+#endif
+
+U_CAPI char U_EXPORT2
+uprv_asciitolower(char c) {
+    if(0x41<=c && c<=0x5a) {
+        c=(char)(c+0x20);
+    }
+    return c;
+}
+
+U_CAPI char U_EXPORT2
+uprv_ebcdictolower(char c) {
+    if( (0xc1<=(uint8_t)c && (uint8_t)c<=0xc9) ||
+        (0xd1<=(uint8_t)c && (uint8_t)c<=0xd9) ||
+        (0xe2<=(uint8_t)c && (uint8_t)c<=0xe9)
+    ) {
+        c=(char)(c-0x40);
+    }
+    return c;
+}
+
+
+U_CAPI char* U_EXPORT2
+T_CString_toLowerCase(char* str)
+{
+    char* origPtr = str;
+
+    if (str) {
+        do
+            *str = (char)uprv_tolower(*str);
+        while (*(str++));
+    }
+
+    return origPtr;
+}
+
+U_CAPI char* U_EXPORT2
+T_CString_toUpperCase(char* str)
+{
+    char* origPtr = str;
+
+    if (str) {
+        do
+            *str = (char)uprv_toupper(*str);
+        while (*(str++));
+    }
+
+    return origPtr;
+}
+
+/*
+ * Takes a int32_t and fills in  a char* string with that number "radix"-based.
+ * Does not handle negative values (makes an empty string for them).
+ * Writes at most 12 chars ("-2147483647" plus NUL).
+ * Returns the length of the string (not including the NUL).
+ */
+U_CAPI int32_t U_EXPORT2
+T_CString_integerToString(char* buffer, int32_t v, int32_t radix)
+{
+    char      tbuf[30];
+    int32_t   tbx    = sizeof(tbuf);
+    uint8_t   digit;
+    int32_t   length = 0;
+    uint32_t  uval;
+    
+    U_ASSERT(radix>=2 && radix<=16);
+    uval = (uint32_t) v;
+    if(v<0 && radix == 10) {
+        /* Only in base 10 do we conside numbers to be signed. */
+        uval = (uint32_t)(-v); 
+        buffer[length++] = '-';
+    }
+    
+    tbx = sizeof(tbuf)-1;
+    tbuf[tbx] = 0;   /* We are generating the digits backwards.  Null term the end. */
+    do {
+        digit = (uint8_t)(uval % radix);
+        tbuf[--tbx] = (char)(T_CString_itosOffset(digit));
+        uval  = uval / radix;
+    } while (uval != 0);
+    
+    /* copy converted number into user buffer  */
+    uprv_strcpy(buffer+length, tbuf+tbx);
+    length += sizeof(tbuf) - tbx -1;
+    return length;
+}
+
+
+
+/*
+ * Takes a int64_t and fills in  a char* string with that number "radix"-based.
+ * Writes at most 21: chars ("-9223372036854775807" plus NUL).
+ * Returns the length of the string, not including the terminating NULL.
+ */
+U_CAPI int32_t U_EXPORT2
+T_CString_int64ToString(char* buffer, int64_t v, uint32_t radix)
+{
+    char      tbuf[30];
+    int32_t   tbx    = sizeof(tbuf);
+    uint8_t   digit;
+    int32_t   length = 0;
+    uint64_t  uval;
+    
+    U_ASSERT(radix>=2 && radix<=16);
+    uval = (uint64_t) v;
+    if(v<0 && radix == 10) {
+        /* Only in base 10 do we conside numbers to be signed. */
+        uval = (uint64_t)(-v); 
+        buffer[length++] = '-';
+    }
+    
+    tbx = sizeof(tbuf)-1;
+    tbuf[tbx] = 0;   /* We are generating the digits backwards.  Null term the end. */
+    do {
+        digit = (uint8_t)(uval % radix);
+        tbuf[--tbx] = (char)(T_CString_itosOffset(digit));
+        uval  = uval / radix;
+    } while (uval != 0);
+    
+    /* copy converted number into user buffer  */
+    uprv_strcpy(buffer+length, tbuf+tbx);
+    length += sizeof(tbuf) - tbx -1;
+    return length;
+}
+
+
+U_CAPI int32_t U_EXPORT2
+T_CString_stringToInteger(const char *integerString, int32_t radix)
+{
+    char *end;
+    return uprv_strtoul(integerString, &end, radix);
+
+}
+    
+U_CAPI int U_EXPORT2
+T_CString_stricmp(const char *str1, const char *str2) {
+    if(str1==NULL) {
+        if(str2==NULL) {
+            return 0;
+        } else {
+            return -1;
+        }
+    } else if(str2==NULL) {
+        return 1;
+    } else {
+        /* compare non-NULL strings lexically with lowercase */
+        int rc;
+        unsigned char c1, c2;
+
+        for(;;) {
+            c1=(unsigned char)*str1;
+            c2=(unsigned char)*str2;
+            if(c1==0) {
+                if(c2==0) {
+                    return 0;
+                } else {
+                    return -1;
+                }
+            } else if(c2==0) {
+                return 1;
+            } else {
+                /* compare non-zero characters with lowercase */
+                rc=(int)(unsigned char)uprv_tolower(c1)-(int)(unsigned char)uprv_tolower(c2);
+                if(rc!=0) {
+                    return rc;
+                }
+            }
+            ++str1;
+            ++str2;
+        }
+    }
+}
+
+U_CAPI int U_EXPORT2
+T_CString_strnicmp(const char *str1, const char *str2, uint32_t n) {
+    if(str1==NULL) {
+        if(str2==NULL) {
+            return 0;
+        } else {
+            return -1;
+        }
+    } else if(str2==NULL) {
+        return 1;
+    } else {
+        /* compare non-NULL strings lexically with lowercase */
+        int rc;
+        unsigned char c1, c2;
+
+        for(; n--;) {
+            c1=(unsigned char)*str1;
+            c2=(unsigned char)*str2;
+            if(c1==0) {
+                if(c2==0) {
+                    return 0;
+                } else {
+                    return -1;
+                }
+            } else if(c2==0) {
+                return 1;
+            } else {
+                /* compare non-zero characters with lowercase */
+                rc=(int)(unsigned char)uprv_tolower(c1)-(int)(unsigned char)uprv_tolower(c2);
+                if(rc!=0) {
+                    return rc;
+                }
+            }
+            ++str1;
+            ++str2;
+        }
+    }
+
+    return 0;
+}
+
+U_CAPI char* U_EXPORT2
+uprv_strdup(const char *src) {
+    size_t len = uprv_strlen(src) + 1;
+    char *dup = (char *) uprv_malloc(len);
+
+    if (dup) {
+        uprv_memcpy(dup, src, len);
+    }
+
+    return dup;
+}
+
+U_CAPI char* U_EXPORT2
+uprv_strndup(const char *src, int32_t n) {
+    char *dup;
+
+    if(n < 0) {
+        dup = uprv_strdup(src);
+    } else {
+        dup = (char*)uprv_malloc(n+1);
+        if (dup) { 
+            uprv_memcpy(dup, src, n);
+            dup[n] = 0;
+        }
+    }
+
+    return dup;
+}
diff --git a/source/common/cstring.h b/source/common/cstring.h
new file mode 100644
index 0000000..6d2fd0e
--- /dev/null
+++ b/source/common/cstring.h
@@ -0,0 +1,120 @@
+/*
+******************************************************************************
+*
+*   Copyright (C) 1997-2005, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*
+* File CSTRING.H
+*
+* Contains CString interface
+*
+* @author       Helena Shih
+*
+* Modification History:
+*
+*   Date        Name        Description
+*   6/17/98     hshih       Created.
+*  05/03/99     stephen     Changed from functions to macros.
+*  06/14/99     stephen     Added icu_strncat, icu_strncmp, icu_tolower
+*
+******************************************************************************
+*/
+
+#ifndef CSTRING_H
+#define CSTRING_H 1
+
+#include "unicode/utypes.h"
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+#define uprv_strcpy(dst, src) U_STANDARD_CPP_NAMESPACE  strcpy(dst, src)
+#define uprv_strncpy(dst, src, size) U_STANDARD_CPP_NAMESPACE strncpy(dst, src, size)
+#define uprv_strlen(str) U_STANDARD_CPP_NAMESPACE strlen(str)
+#define uprv_strcmp(s1, s2) U_STANDARD_CPP_NAMESPACE strcmp(s1, s2)
+#define uprv_strncmp(s1, s2, n) U_STANDARD_CPP_NAMESPACE strncmp(s1, s2, n)
+#define uprv_strcat(dst, src) U_STANDARD_CPP_NAMESPACE strcat(dst, src)
+#define uprv_strncat(dst, src, n) U_STANDARD_CPP_NAMESPACE strncat(dst, src, n)
+#define uprv_strchr(s, c) U_STANDARD_CPP_NAMESPACE strchr(s, c)
+#define uprv_strstr(s, c) U_STANDARD_CPP_NAMESPACE strstr(s, c)
+#define uprv_strrchr(s, c) U_STANDARD_CPP_NAMESPACE strrchr(s, c)
+
+U_CAPI char U_EXPORT2
+uprv_toupper(char c);
+
+
+U_CAPI char U_EXPORT2
+uprv_asciitolower(char c);
+
+U_CAPI char U_EXPORT2
+uprv_ebcdictolower(char c);
+
+#if U_CHARSET_FAMILY==U_ASCII_FAMILY
+#   define uprv_tolower uprv_asciitolower
+#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
+#   define uprv_tolower uprv_ebcdictolower
+#else
+#   error U_CHARSET_FAMILY is not valid
+#endif
+
+#define uprv_strtod(source, end) U_STANDARD_CPP_NAMESPACE strtod(source, end)
+#define uprv_strtoul(str, end, base) U_STANDARD_CPP_NAMESPACE strtoul(str, end, base)
+#define uprv_strtol(str, end, base) U_STANDARD_CPP_NAMESPACE strtol(str, end, base)
+#ifdef U_WINDOWS
+#   if defined(__BORLANDC__)
+#       define uprv_stricmp(str1, str2) U_STANDARD_CPP_NAMESPACE stricmp(str1, str2)
+#       define uprv_strnicmp(str1, str2, n) U_STANDARD_CPP_NAMESPACE strnicmp(str1, str2, n)
+#   else
+#       define uprv_stricmp(str1, str2) U_STANDARD_CPP_NAMESPACE _stricmp(str1, str2)
+#       define uprv_strnicmp(str1, str2, n) U_STANDARD_CPP_NAMESPACE _strnicmp(str1, str2, n)
+#   endif
+#elif defined(POSIX) 
+#   define uprv_stricmp(str1, str2) U_STANDARD_CPP_NAMESPACE strcasecmp(str1, str2) 
+#   define uprv_strnicmp(str1, str2, n) U_STANDARD_CPP_NAMESPACE strncasecmp(str1, str2, n) 
+#else
+#   define uprv_stricmp(str1, str2) T_CString_stricmp(str1, str2)
+#   define uprv_strnicmp(str1, str2, n) T_CString_strnicmp(str1, str2, n)
+#endif
+
+/* Conversion from a digit to the character with radix base from 2-19 */
+/* May need to use U_UPPER_ORDINAL*/
+#define T_CString_itosOffset(a) ((a)<=9?('0'+(a)):('A'+(a)-10))
+
+U_CAPI char* U_EXPORT2
+uprv_strdup(const char *src);
+
+/**
+ * uprv_malloc n+1 bytes, and copy n bytes from src into the new string.
+ * Terminate with a null at offset n.   If n is -1, works like uprv_strdup
+ * @param src
+ * @param n length of the input string, not including null.
+ * @return new string (owned by caller, use uprv_free to free).
+ * @internal
+ */
+U_CAPI char* U_EXPORT2
+uprv_strndup(const char *src, int32_t n);
+
+U_CAPI char* U_EXPORT2
+T_CString_toLowerCase(char* str);
+
+U_CAPI char* U_EXPORT2
+T_CString_toUpperCase(char* str);
+
+U_CAPI int32_t U_EXPORT2
+T_CString_integerToString(char *buffer, int32_t n, int32_t radix);
+
+U_CAPI int32_t U_EXPORT2
+T_CString_int64ToString(char *buffer, int64_t n, uint32_t radix);
+
+U_CAPI int32_t U_EXPORT2
+T_CString_stringToInteger(const char *integerString, int32_t radix);
+
+U_CAPI int U_EXPORT2
+T_CString_stricmp(const char *str1, const char *str2);
+
+U_CAPI int U_EXPORT2
+T_CString_strnicmp(const char *str1, const char *str2, uint32_t n);
+
+#endif /* ! CSTRING_H */
diff --git a/source/common/cwchar.c b/source/common/cwchar.c
new file mode 100644
index 0000000..78bb8c5
--- /dev/null
+++ b/source/common/cwchar.c
@@ -0,0 +1,53 @@
+/*  
+******************************************************************************
+*
+*   Copyright (C) 2001, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*   file name:  cwchar.c
+*   encoding:   US-ASCII
+*   tab size:   8 (not used)
+*   indentation:4
+*
+*   created on: 2001may25
+*   created by: Markus W. Scherer
+*/
+
+#include "unicode/utypes.h"
+
+#if !U_HAVE_WCSCPY
+
+#include "cwchar.h"
+
+U_CAPI wchar_t *uprv_wcscat(wchar_t *dst, const wchar_t *src) {
+    wchar_t *start=dst;
+    while(*dst!=0) {
+        ++dst;
+    }
+    while((*dst=*src)!=0) {
+        ++dst;
+        ++src;
+    }
+    return start;
+}
+
+U_CAPI wchar_t *uprv_wcscpy(wchar_t *dst, const wchar_t *src) {
+    wchar_t *start=dst;
+    while((*dst=*src)!=0) {
+        ++dst;
+        ++src;
+    }
+    return start;
+}
+
+U_CAPI size_t uprv_wcslen(const wchar_t *src) {
+    const wchar_t *start=src;
+    while(*src!=0) {
+        ++src;
+    }
+    return src-start;
+}
+
+#endif
+
diff --git a/source/common/cwchar.h b/source/common/cwchar.h
new file mode 100644
index 0000000..2ab36c0
--- /dev/null
+++ b/source/common/cwchar.h
@@ -0,0 +1,56 @@
+/*  
+******************************************************************************
+*
+*   Copyright (C) 2001, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*   file name:  cwchar.h
+*   encoding:   US-ASCII
+*   tab size:   8 (not used)
+*   indentation:4
+*
+*   created on: 2001may25
+*   created by: Markus W. Scherer
+*
+*   This file contains ICU-internal definitions of wchar_t operations.
+*   These definitions were moved here from cstring.h so that fewer
+*   ICU implementation files include wchar.h.
+*/
+
+#ifndef __CWCHAR_H__
+#define __CWCHAR_H__
+
+#include <string.h>
+#include <stdlib.h>
+#include "unicode/utypes.h"
+
+/* Do this after utypes.h so that we have U_HAVE_WCHAR_H . */
+#if U_HAVE_WCHAR_H
+#   include <wchar.h>
+#endif
+
+/*===========================================================================*/
+/* Wide-character functions                                                  */
+/*===========================================================================*/
+
+/* The following are not available on all systems, defined in wchar.h or string.h. */
+#if U_HAVE_WCSCPY
+#   define uprv_wcscpy wcscpy
+#   define uprv_wcscat wcscat
+#   define uprv_wcslen wcslen
+#else
+U_CAPI wchar_t* U_EXPORT2 
+uprv_wcscpy(wchar_t *dst, const wchar_t *src);
+U_CAPI wchar_t* U_EXPORT2 
+uprv_wcscat(wchar_t *dst, const wchar_t *src);
+U_CAPI size_t U_EXPORT2 
+uprv_wcslen(const wchar_t *src);
+#endif
+
+/* The following are part of the ANSI C standard, defined in stdlib.h . */
+#define uprv_wcstombs(mbstr, wcstr, count) U_STANDARD_CPP_NAMESPACE wcstombs(mbstr, wcstr, count)
+#define uprv_mbstowcs(wcstr, mbstr, count) U_STANDARD_CPP_NAMESPACE mbstowcs(wcstr, mbstr, count)
+
+
+#endif
diff --git a/source/common/dictbe.cpp b/source/common/dictbe.cpp
new file mode 100644
index 0000000..a779727
--- /dev/null
+++ b/source/common/dictbe.cpp
@@ -0,0 +1,426 @@
+/**
+ *******************************************************************************
+ * Copyright (C) 2006, International Business Machines Corporation and others. *
+ * All Rights Reserved.                                                        *
+ *******************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_BREAK_ITERATION
+
+#include "brkeng.h"
+#include "dictbe.h"
+#include "unicode/uniset.h"
+#include "unicode/chariter.h"
+#include "unicode/ubrk.h"
+#include "uvector.h"
+#include "triedict.h"
+
+U_NAMESPACE_BEGIN
+
+/*
+ ******************************************************************
+ */
+
+/*DictionaryBreakEngine::DictionaryBreakEngine() {
+    fTypes = 0;
+}*/
+
+DictionaryBreakEngine::DictionaryBreakEngine(uint32_t breakTypes) {
+    fTypes = breakTypes;
+}
+
+DictionaryBreakEngine::~DictionaryBreakEngine() {
+}
+
+UBool
+DictionaryBreakEngine::handles(UChar32 c, int32_t breakType) const {
+    return (breakType >= 0 && breakType < 32 && (((uint32_t)1 << breakType) & fTypes)
+            && fSet.contains(c));
+}
+
+int32_t
+DictionaryBreakEngine::findBreaks( UText *text,
+                                 int32_t startPos,
+                                 int32_t endPos,
+                                 UBool reverse,
+                                 int32_t breakType,
+                                 UStack &foundBreaks ) const {
+    int32_t result = 0;
+
+    // Find the span of characters included in the set.
+    int32_t start = (int32_t)utext_getNativeIndex(text);
+    int32_t current;
+    int32_t rangeStart;
+    int32_t rangeEnd;
+    UChar32 c = utext_current32(text);
+    if (reverse) {
+        UBool   isDict = fSet.contains(c);
+        while((current = (int32_t)utext_getNativeIndex(text)) > startPos && isDict) {
+            c = utext_previous32(text);
+            isDict = fSet.contains(c);
+        }
+        rangeStart = (current < startPos) ? startPos : current+(isDict ? 0 : 1);
+        rangeEnd = start + 1;
+    }
+    else {
+        while((current = (int32_t)utext_getNativeIndex(text)) < endPos && fSet.contains(c)) {
+            utext_next32(text);         // TODO:  recast loop for postincrement
+            c = utext_current32(text);
+        }
+        rangeStart = start;
+        rangeEnd = current;
+    }
+    if (breakType >= 0 && breakType < 32 && (((uint32_t)1 << breakType) & fTypes)) {
+        result = divideUpDictionaryRange(text, rangeStart, rangeEnd, foundBreaks);
+        utext_setNativeIndex(text, current);
+    }
+    
+    return result;
+}
+
+void
+DictionaryBreakEngine::setCharacters( const UnicodeSet &set ) {
+    fSet = set;
+    // Compact for caching
+    fSet.compact();
+}
+
+/*void
+DictionaryBreakEngine::setBreakTypes( uint32_t breakTypes ) {
+    fTypes = breakTypes;
+}*/
+
+/*
+ ******************************************************************
+ */
+
+
+// Helper class for improving readability of the Thai word break
+// algorithm. The implementation is completely inline.
+
+// List size, limited by the maximum number of words in the dictionary
+// that form a nested sequence.
+#define POSSIBLE_WORD_LIST_MAX 20
+
+class PossibleWord {
+ private:
+  // list of word candidate lengths, in increasing length order
+  int32_t   lengths[POSSIBLE_WORD_LIST_MAX];
+  int       count;      // Count of candidates
+  int32_t   prefix;     // The longest match with a dictionary word
+  int32_t   offset;     // Offset in the text of these candidates
+  int       mark;       // The preferred candidate's offset
+  int       current;    // The candidate we're currently looking at
+
+ public:
+  PossibleWord();
+  ~PossibleWord();
+  
+  // Fill the list of candidates if needed, select the longest, and return the number found
+  int       candidates( UText *text, const TrieWordDictionary *dict, int32_t rangeEnd );
+  
+  // Select the currently marked candidate, point after it in the text, and invalidate self
+  int32_t   acceptMarked( UText *text );
+  
+  // Back up from the current candidate to the next shorter one; return TRUE if that exists
+  // and point the text after it
+  UBool     backUp( UText *text );
+  
+  // Return the longest prefix this candidate location shares with a dictionary word
+  int32_t   longestPrefix();
+  
+  // Mark the current candidate as the one we like
+  void      markCurrent();
+};
+
+inline
+PossibleWord::PossibleWord() {
+    offset = -1;
+}
+
+inline
+PossibleWord::~PossibleWord() {
+}
+
+inline int
+PossibleWord::candidates( UText *text, const TrieWordDictionary *dict, int32_t rangeEnd ) {
+    // TODO: If getIndex is too slow, use offset < 0 and add discardAll()
+    int32_t start = (int32_t)utext_getNativeIndex(text);
+    if (start != offset) {
+        offset = start;
+        prefix = dict->matches(text, rangeEnd-start, lengths, count, sizeof(lengths)/sizeof(lengths[0]));
+        // Dictionary leaves text after longest prefix, not longest word. Back up.
+        if (count <= 0) {
+            utext_setNativeIndex(text, start);
+        }
+    }
+    if (count > 0) {
+        utext_setNativeIndex(text, start+lengths[count-1]);
+    }
+    current = count-1;
+    mark = current;
+    return count;
+}
+
+inline int32_t
+PossibleWord::acceptMarked( UText *text ) {
+    utext_setNativeIndex(text, offset + lengths[mark]);
+    return lengths[mark];
+}
+
+inline UBool
+PossibleWord::backUp( UText *text ) {
+    if (current > 0) {
+        utext_setNativeIndex(text, offset + lengths[--current]);
+        return TRUE;
+    }
+    return FALSE;
+}
+
+inline int32_t
+PossibleWord::longestPrefix() {
+    return prefix;
+}
+
+inline void
+PossibleWord::markCurrent() {
+    mark = current;
+}
+
+// How many words in a row are "good enough"?
+#define THAI_LOOKAHEAD 3
+
+// Will not combine a non-word with a preceding dictionary word longer than this
+#define THAI_ROOT_COMBINE_THRESHOLD 3
+
+// Will not combine a non-word that shares at least this much prefix with a
+// dictionary word, with a preceding word
+#define THAI_PREFIX_COMBINE_THRESHOLD 3
+
+// Ellision character
+#define THAI_PAIYANNOI 0x0E2F
+
+// Repeat character
+#define THAI_MAIYAMOK 0x0E46
+
+// Minimum word size
+#define THAI_MIN_WORD 2
+
+// Minimum number of characters for two words
+#define THAI_MIN_WORD_SPAN (THAI_MIN_WORD * 2)
+
+ThaiBreakEngine::ThaiBreakEngine(const TrieWordDictionary *adoptDictionary, UErrorCode &status)
+    : DictionaryBreakEngine((1<<UBRK_WORD) | (1<<UBRK_LINE)),
+      fDictionary(adoptDictionary)
+{
+    fThaiWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Thai:]&[:LineBreak=SA:]]"), status);
+    if (U_SUCCESS(status)) {
+        setCharacters(fThaiWordSet);
+    }
+    fMarkSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Thai:]&[:LineBreak=SA:]&[:M:]]"), status);
+    fEndWordSet = fThaiWordSet;
+    fEndWordSet.remove(0x0E31);             // MAI HAN-AKAT
+    fEndWordSet.remove(0x0E40, 0x0E44);     // SARA E through SARA AI MAIMALAI
+    fBeginWordSet.add(0x0E01, 0x0E2E);      // KO KAI through HO NOKHUK
+    fBeginWordSet.add(0x0E40, 0x0E44);      // SARA E through SARA AI MAIMALAI
+    fSuffixSet.add(THAI_PAIYANNOI);
+    fSuffixSet.add(THAI_MAIYAMOK);
+
+    // Compact for caching.
+    fMarkSet.compact();
+    fEndWordSet.compact();
+    fBeginWordSet.compact();
+    fSuffixSet.compact();
+}
+
+ThaiBreakEngine::~ThaiBreakEngine() {
+    delete fDictionary;
+}
+
+int32_t
+ThaiBreakEngine::divideUpDictionaryRange( UText *text,
+                                                int32_t rangeStart,
+                                                int32_t rangeEnd,
+                                                UStack &foundBreaks ) const {
+    if ((rangeEnd - rangeStart) < THAI_MIN_WORD_SPAN) {
+        return 0;       // Not enough characters for two words
+    }
+
+    uint32_t wordsFound = 0;
+    int32_t wordLength;
+    int32_t current;
+    UErrorCode status = U_ZERO_ERROR;
+    PossibleWord words[THAI_LOOKAHEAD];
+    UChar32 uc;
+    
+    utext_setNativeIndex(text, rangeStart);
+    
+    while (U_SUCCESS(status) && (current = (int32_t)utext_getNativeIndex(text)) < rangeEnd) {
+        wordLength = 0;
+
+        // Look for candidate words at the current position
+        int candidates = words[wordsFound%THAI_LOOKAHEAD].candidates(text, fDictionary, rangeEnd);
+        
+        // If we found exactly one, use that
+        if (candidates == 1) {
+            wordLength = words[wordsFound%THAI_LOOKAHEAD].acceptMarked(text);
+            wordsFound += 1;
+        }
+        
+        // If there was more than one, see which one can take us forward the most words
+        else if (candidates > 1) {
+            // If we're already at the end of the range, we're done
+            if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) {
+                goto foundBest;
+            }
+            do {
+                int wordsMatched = 1;
+                if (words[(wordsFound+1)%THAI_LOOKAHEAD].candidates(text, fDictionary, rangeEnd) > 0) {
+                    if (wordsMatched < 2) {
+                        // Followed by another dictionary word; mark first word as a good candidate
+                        words[wordsFound%THAI_LOOKAHEAD].markCurrent();
+                        wordsMatched = 2;
+                    }
+                    
+                    // If we're already at the end of the range, we're done
+                    if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) {
+                        goto foundBest;
+                    }
+                    
+                    // See if any of the possible second words is followed by a third word
+                    do {
+                        // If we find a third word, stop right away
+                        if (words[(wordsFound+2)%THAI_LOOKAHEAD].candidates(text, fDictionary, rangeEnd)) {
+                            words[wordsFound%THAI_LOOKAHEAD].markCurrent();
+                            goto foundBest;
+                        }
+                    }
+                    while (words[(wordsFound+1)%THAI_LOOKAHEAD].backUp(text));
+                }
+            }
+            while (words[wordsFound%THAI_LOOKAHEAD].backUp(text));
+foundBest:
+            wordLength = words[wordsFound%THAI_LOOKAHEAD].acceptMarked(text);
+            wordsFound += 1;
+        }
+        
+        // We come here after having either found a word or not. We look ahead to the
+        // next word. If it's not a dictionary word, we will combine it withe the word we
+        // just found (if there is one), but only if the preceding word does not exceed
+        // the threshold.
+        // The text iterator should now be positioned at the end of the word we found.
+        if ((int32_t)utext_getNativeIndex(text) < rangeEnd && wordLength < THAI_ROOT_COMBINE_THRESHOLD) {
+            // if it is a dictionary word, do nothing. If it isn't, then if there is
+            // no preceding word, or the non-word shares less than the minimum threshold
+            // of characters with a dictionary word, then scan to resynchronize
+            if (words[wordsFound%THAI_LOOKAHEAD].candidates(text, fDictionary, rangeEnd) <= 0
+                  && (wordLength == 0
+                      || words[wordsFound%THAI_LOOKAHEAD].longestPrefix() < THAI_PREFIX_COMBINE_THRESHOLD)) {
+                // Look for a plausible word boundary
+                //TODO: This section will need a rework for UText.
+                int32_t remaining = rangeEnd - (current+wordLength);
+                UChar32 pc = utext_current32(text);
+                int32_t chars = 0;
+                for (;;) {
+                    utext_next32(text);
+                    uc = utext_current32(text);
+                    // TODO: Here we're counting on the fact that the SA languages are all
+                    // in the BMP. This should get fixed with the UText rework.
+                    chars += 1;
+                    if (--remaining <= 0) {
+                        break;
+                    }
+                    if (fEndWordSet.contains(pc) && fBeginWordSet.contains(uc)) {
+                        // Maybe. See if it's in the dictionary.
+                        // NOTE: In the original Apple code, checked that the next
+                        // two characters after uc were not 0x0E4C THANTHAKHAT before
+                        // checking the dictionary. That is just a performance filter,
+                        // but it's not clear it's faster than checking the trie.
+                        int candidates = words[(wordsFound+1)%THAI_LOOKAHEAD].candidates(text, fDictionary, rangeEnd);
+                        utext_setNativeIndex(text, current+wordLength+chars);
+                        if (candidates > 0) {
+                            break;
+                        }
+                    }
+                    pc = uc;
+                }
+                
+                // Bump the word count if there wasn't already one
+                if (wordLength <= 0) {
+                    wordsFound += 1;
+                }
+                
+                // Update the length with the passed-over characters
+                wordLength += chars;
+            }
+            else {
+                // Back up to where we were for next iteration
+                utext_setNativeIndex(text, current+wordLength);
+            }
+        }
+        
+        // Never stop before a combining mark.
+        int32_t currPos;
+        while ((currPos = (int32_t)utext_getNativeIndex(text)) < rangeEnd && fMarkSet.contains(utext_current32(text))) {
+            utext_next32(text);
+            wordLength += (int32_t)utext_getNativeIndex(text) - currPos;
+        }
+        
+        // Look ahead for possible suffixes if a dictionary word does not follow.
+        // We do this in code rather than using a rule so that the heuristic
+        // resynch continues to function. For example, one of the suffix characters
+        // could be a typo in the middle of a word.
+        if ((int32_t)utext_getNativeIndex(text) < rangeEnd && wordLength > 0) {
+            if (words[wordsFound%THAI_LOOKAHEAD].candidates(text, fDictionary, rangeEnd) <= 0
+                && fSuffixSet.contains(uc = utext_current32(text))) {
+                if (uc == THAI_PAIYANNOI) {
+                    if (!fSuffixSet.contains(utext_previous32(text))) {
+                        // Skip over previous end and PAIYANNOI
+                        utext_next32(text);
+                        utext_next32(text);
+                        wordLength += 1;            // Add PAIYANNOI to word
+                        uc = utext_current32(text);     // Fetch next character
+                    }
+                    else {
+                        // Restore prior position
+                        utext_next32(text);
+                    }
+                }
+                if (uc == THAI_MAIYAMOK) {
+                    if (utext_previous32(text) != THAI_MAIYAMOK) {
+                        // Skip over previous end and MAIYAMOK
+                        utext_next32(text);
+                        utext_next32(text);
+                        wordLength += 1;            // Add MAIYAMOK to word
+                    }
+                    else {
+                        // Restore prior position
+                        utext_next32(text);
+                    }
+                }
+            }
+            else {
+                utext_setNativeIndex(text, current+wordLength);
+            }
+        }
+        
+        // Did we find a word on this iteration? If so, push it on the break stack
+        if (wordLength > 0) {
+            foundBreaks.push((current+wordLength), status);
+        }
+    }
+    
+    // Don't return a break for the end of the dictionary range if there is one there.
+    if (foundBreaks.peeki() >= rangeEnd) {
+        (void) foundBreaks.popi();
+        wordsFound -= 1;
+    }
+
+    return wordsFound;
+}
+
+U_NAMESPACE_END
+
+#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
diff --git a/source/common/dictbe.h b/source/common/dictbe.h
new file mode 100644
index 0000000..d6f8b14
--- /dev/null
+++ b/source/common/dictbe.h
@@ -0,0 +1,193 @@
+/**
+ *******************************************************************************
+ * Copyright (C) 2006, International Business Machines Corporation and others. *
+ * All Rights Reserved.                                                        *
+ *******************************************************************************
+ */
+
+#ifndef DICTBE_H
+#define DICTBE_H
+
+#include "unicode/utypes.h"
+#include "unicode/uniset.h"
+#include "unicode/utext.h"
+
+#include "brkeng.h"
+
+U_NAMESPACE_BEGIN
+
+class TrieWordDictionary;
+
+/*******************************************************************
+ * DictionaryBreakEngine
+ */
+
+/**
+ * <p>DictionaryBreakEngine is a kind of LanguageBreakEngine that uses a
+ * dictionary to determine language-specific breaks.</p>
+ *
+ * <p>After it is constructed a DictionaryBreakEngine may be shared between
+ * threads without synchronization.</p>
+ */
+class DictionaryBreakEngine : public LanguageBreakEngine {
+ private:
+    /**
+     * The set of characters handled by this engine
+     * @internal
+     */
+
+  UnicodeSet    fSet;
+
+    /**
+     * The set of break types handled by this engine
+     * @internal
+     */
+
+  uint32_t      fTypes;
+
+  /**
+   * <p>Default constructor.</p>
+   *
+   */
+  DictionaryBreakEngine();
+
+ public:
+
+  /**
+   * <p>Constructor setting the break types handled.</p>
+   *
+   * @param breakTypes A bitmap of types handled by the engine.
+   */
+  DictionaryBreakEngine( uint32_t breakTypes );
+
+  /**
+   * <p>Virtual destructor.</p>
+   */
+  virtual ~DictionaryBreakEngine();
+
+ /**
+  * <p>Indicate whether this engine handles a particular character for
+  * a particular kind of break.</p>
+  *
+  * @param c A character which begins a run that the engine might handle
+  * @param breakType The type of text break which the caller wants to determine
+  * @return TRUE if this engine handles the particular character and break
+  * type.
+  */
+  virtual UBool handles( UChar32 c, int32_t breakType ) const;
+
+ /**
+  * <p>Find any breaks within a run in the supplied text.</p>
+  *
+  * @param text A UText representing the text. The
+  * iterator is left at the end of the run of characters which the engine
+  * is capable of handling.
+  * @param startPos The start of the run within the supplied text.
+  * @param endPos The end of the run within the supplied text.
+  * @param reverse Whether the caller is looking for breaks in a reverse
+  * direction.
+  * @param breakType The type of break desired, or -1.
+  * @param foundBreaks An allocated C array of the breaks found, if any
+  * @return The number of breaks found.
+  */
+  virtual int32_t findBreaks( UText *text,
+                              int32_t startPos,
+                              int32_t endPos,
+                              UBool reverse,
+                              int32_t breakType,
+                              UStack &foundBreaks ) const;
+
+ protected:
+
+ /**
+  * <p>Set the character set handled by this engine.</p>
+  *
+  * @param set A UnicodeSet of the set of characters handled by the engine
+  */
+  virtual void setCharacters( const UnicodeSet &set );
+
+ /**
+  * <p>Set the break types handled by this engine.</p>
+  *
+  * @param breakTypes A bitmap of types handled by the engine.
+  */
+//  virtual void setBreakTypes( uint32_t breakTypes );
+
+ /**
+  * <p>Divide up a range of known dictionary characters.</p>
+  *
+  * @param text A UText representing the text
+  * @param rangeStart The start of the range of dictionary characters
+  * @param rangeEnd The end of the range of dictionary characters
+  * @param foundBreaks Output of C array of int32_t break positions, or 0
+  * @return The number of breaks found
+  */
+  virtual int32_t divideUpDictionaryRange( UText *text,
+                                           int32_t rangeStart,
+                                           int32_t rangeEnd,
+                                           UStack &foundBreaks ) const = 0;
+
+};
+
+/*******************************************************************
+ * ThaiBreakEngine
+ */
+
+/**
+ * <p>ThaiBreakEngine is a kind of DictionaryBreakEngine that uses a
+ * TrieWordDictionary and heuristics to determine Thai-specific breaks.</p>
+ *
+ * <p>After it is constructed a ThaiBreakEngine may be shared between
+ * threads without synchronization.</p>
+ */
+class ThaiBreakEngine : public DictionaryBreakEngine {
+ private:
+    /**
+     * The set of characters handled by this engine
+     * @internal
+     */
+
+  UnicodeSet                fThaiWordSet;
+  UnicodeSet                fEndWordSet;
+  UnicodeSet                fBeginWordSet;
+  UnicodeSet                fSuffixSet;
+  UnicodeSet                fMarkSet;
+  const TrieWordDictionary  *fDictionary;
+
+ public:
+
+  /**
+   * <p>Default constructor.</p>
+   *
+   * @param adoptDictionary A TrieWordDictionary to adopt. Deleted when the
+   * engine is deleted.
+   */
+  ThaiBreakEngine(const TrieWordDictionary *adoptDictionary, UErrorCode &status);
+
+  /**
+   * <p>Virtual destructor.</p>
+   */
+  virtual ~ThaiBreakEngine();
+
+ protected:
+ /**
+  * <p>Divide up a range of known dictionary characters.</p>
+  *
+  * @param text A UText representing the text
+  * @param rangeStart The start of the range of dictionary characters
+  * @param rangeEnd The end of the range of dictionary characters
+  * @param foundBreaks Output of C array of int32_t break positions, or 0
+  * @return The number of breaks found
+  */
+  virtual int32_t divideUpDictionaryRange( UText *text,
+                                           int32_t rangeStart,
+                                           int32_t rangeEnd,
+                                           UStack &foundBreaks ) const;
+
+};
+
+
+U_NAMESPACE_END
+
+    /* DICTBE_H */
+#endif
diff --git a/source/common/hash.h b/source/common/hash.h
new file mode 100644
index 0000000..375499b
--- /dev/null
+++ b/source/common/hash.h
@@ -0,0 +1,207 @@
+/*
+******************************************************************************
+*   Copyright (C) 1997-2006, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+******************************************************************************
+*   Date        Name        Description
+*   03/28/00    aliu        Creation.
+******************************************************************************
+*/
+
+#ifndef HASH_H
+#define HASH_H
+
+#include "unicode/unistr.h"
+#include "unicode/uobject.h"
+#include "uhash.h"
+
+U_NAMESPACE_BEGIN
+
+/**
+ * Hashtable is a thin C++ wrapper around UHashtable, a general-purpose void*
+ * hashtable implemented in C.  Hashtable is designed to be idiomatic and
+ * easy-to-use in C++.
+ *
+ * Hashtable is an INTERNAL CLASS.
+ */
+class U_COMMON_API Hashtable : public UMemory {
+    UHashtable* hash;
+    UHashtable hashObj;
+
+    inline void init(UHashFunction *keyHash, UKeyComparator *keyComp, UValueComparator *valueComp, UErrorCode& status);
+
+public:
+    /**
+     * Construct a hashtable
+     * @param ignoreKeyCase If true, keys are case insensitive.
+     * @param status Error code
+    */
+    Hashtable(UBool ignoreKeyCase, UErrorCode& status);
+
+    /**
+     * Construct a hashtable
+     * @param keyComp Compartor for comparing the keys
+     * @param valueComp Compartor for comparing the values
+     * @param status Error code
+    */
+    Hashtable(UKeyComparator *keyComp, UValueComparator *valueComp, UErrorCode& status);
+
+    /**
+     * Construct a hashtable
+     * @param status Error code
+    */
+    Hashtable(UErrorCode& status);
+
+    /**
+     * Construct a hashtable, _disregarding any error_.  Use this constructor
+     * with caution.
+     */
+    Hashtable();
+
+    /**
+     * Non-virtual destructor; make this virtual if Hashtable is subclassed
+     * in the future.
+     */
+    ~Hashtable();
+
+    UObjectDeleter *setValueDeleter(UObjectDeleter *fn);
+
+    int32_t count() const;
+
+    void* put(const UnicodeString& key, void* value, UErrorCode& status);
+
+    int32_t puti(const UnicodeString& key, int32_t value, UErrorCode& status);
+
+    void* get(const UnicodeString& key) const;
+    
+    int32_t geti(const UnicodeString& key) const;
+    
+    void* remove(const UnicodeString& key);
+
+    int32_t removei(const UnicodeString& key);
+
+    void removeAll(void);
+
+    const UHashElement* find(const UnicodeString& key) const;
+
+    const UHashElement* nextElement(int32_t& pos) const;
+    
+    UKeyComparator* setKeyCompartor(UKeyComparator*keyComp);
+    
+    UValueComparator* setValueCompartor(UValueComparator* valueComp);
+
+    UBool equals(const Hashtable& that) const;
+private:
+    Hashtable(const Hashtable &other); // forbid copying of this class
+    Hashtable &operator=(const Hashtable &other); // forbid copying of this class
+};
+
+/*********************************************************************
+ * Implementation
+ ********************************************************************/
+
+inline void Hashtable::init(UHashFunction *keyHash, UKeyComparator *keyComp, 
+                            UValueComparator *valueComp, UErrorCode& status) {
+    if (U_FAILURE(status)) {
+        return;
+    }
+    uhash_init(&hashObj, keyHash, keyComp, valueComp, &status);
+    if (U_SUCCESS(status)) {
+        hash = &hashObj;
+        uhash_setKeyDeleter(hash, uhash_deleteUnicodeString);
+    }
+}
+
+inline Hashtable::Hashtable(UKeyComparator *keyComp, UValueComparator *valueComp, 
+                 UErrorCode& status) : hash(0) {
+    init( uhash_hashUnicodeString, keyComp, valueComp, status);
+}
+inline Hashtable::Hashtable(UBool ignoreKeyCase, UErrorCode& status)
+ : hash(0)
+{
+    init(ignoreKeyCase ? uhash_hashCaselessUnicodeString
+                        : uhash_hashUnicodeString,
+            ignoreKeyCase ? uhash_compareCaselessUnicodeString
+                        : uhash_compareUnicodeString,
+            NULL,
+            status);
+}
+
+inline Hashtable::Hashtable(UErrorCode& status)
+ : hash(0)
+{
+    init(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, status);
+}
+
+inline Hashtable::Hashtable()
+ : hash(0)
+{
+    UErrorCode status = U_ZERO_ERROR;
+    init(uhash_hashUnicodeString, uhash_compareUnicodeString, NULL, status);
+}
+
+inline Hashtable::~Hashtable() {
+    if (hash != NULL) {
+        uhash_close(hash);
+    }
+}
+
+inline UObjectDeleter *Hashtable::setValueDeleter(UObjectDeleter *fn) {
+    return uhash_setValueDeleter(hash, fn);
+}
+
+inline int32_t Hashtable::count() const {
+    return uhash_count(hash);
+}
+
+inline void* Hashtable::put(const UnicodeString& key, void* value, UErrorCode& status) {
+    return uhash_put(hash, new UnicodeString(key), value, &status);
+}
+
+inline int32_t Hashtable::puti(const UnicodeString& key, int32_t value, UErrorCode& status) {
+    return uhash_puti(hash, new UnicodeString(key), value, &status);
+}
+
+inline void* Hashtable::get(const UnicodeString& key) const {
+    return uhash_get(hash, &key);
+}
+
+inline int32_t Hashtable::geti(const UnicodeString& key) const {
+    return uhash_geti(hash, &key);
+}
+
+inline void* Hashtable::remove(const UnicodeString& key) {
+    return uhash_remove(hash, &key);
+}
+
+inline int32_t Hashtable::removei(const UnicodeString& key) {
+    return uhash_removei(hash, &key);
+}
+
+inline const UHashElement* Hashtable::find(const UnicodeString& key) const {
+    return uhash_find(hash, &key);
+}
+
+inline const UHashElement* Hashtable::nextElement(int32_t& pos) const {
+    return uhash_nextElement(hash, &pos);
+}
+
+inline void Hashtable::removeAll(void) {
+    uhash_removeAll(hash);
+}
+
+inline UKeyComparator* Hashtable::setKeyCompartor(UKeyComparator*keyComp){
+    return uhash_setKeyComparator(hash, keyComp);
+}
+    
+inline UValueComparator* Hashtable::setValueCompartor(UValueComparator* valueComp){
+    return uhash_setValueComparator(hash, valueComp);
+}
+
+inline UBool Hashtable::equals(const Hashtable& that)const{
+   return uhash_equals(hash, that.hash);
+}
+U_NAMESPACE_END
+
+#endif
+
diff --git a/source/common/icucfg.h.in b/source/common/icucfg.h.in
new file mode 100644
index 0000000..98fc0ff
--- /dev/null
+++ b/source/common/icucfg.h.in
@@ -0,0 +1,61 @@
+/* common/icucfg.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if you have the ANSI C header files.  */
+#undef STDC_HEADERS
+
+/* Define if your processor stores words with the most significant
+   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
+#undef WORDS_BIGENDIAN
+
+/* Copyright (c) 1999-2000, International Business Machines Corporation and
+   others. All Rights Reserved. */
+/* Define to signed char if not in <sys/types.h> */
+#undef int8_t
+
+/* Define to unsigned char if not in <sys/types.h> */
+#undef uint8_t 
+
+/* Define to signed short if not in <sys/types.h> */
+#undef int16_t 
+
+/* Define to unsigned short if not in <sys/types.h> */
+#undef uint16_t 
+
+/* Define to signed long if not in <sys/types.h> */
+#undef int32_t 
+
+/* Define to unsigned long if not in <sys/types.h> */
+#undef uint32_t 
+
+/* Define to signed char if not in <sys/types.h> */
+#undef bool_t 
+
+/* Define if your system has <wchar.h> */
+#undef HAVE_WCHAR_H
+
+/* Define to the size of wchar_t */
+#undef SIZEOF_WCHAR_T
+
+/* Define if you have the <inttypes.h> header file.  */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have the cma library (-lcma).  */
+#undef HAVE_LIBCMA
+
+/* Define if you have the dl library (-ldl).  */
+#undef HAVE_LIBDL
+
+/* Define if you have the dld library (-ldld).  */
+#undef HAVE_LIBDLD
+
+/* Define if you have the m library (-lm).  */
+#undef HAVE_LIBM
+
+/* Define if you have the pthread library (-lpthread).  */
+#undef HAVE_LIBPTHREAD
+
+/* Define if you have the pthreads library (-lpthreads).  */
+#undef HAVE_LIBPTHREADS
+
+/* Define if you have the wcs library (-lwcs).  */
+#undef HAVE_LIBWCS
diff --git a/source/common/localsvc.h b/source/common/localsvc.h
new file mode 100644
index 0000000..67e5a84
--- /dev/null
+++ b/source/common/localsvc.h
@@ -0,0 +1,25 @@
+/*
+***************************************************************************
+*   Copyright (C) 2006 International Business Machines Corporation        *
+*   and others. All rights reserved.                                      *
+***************************************************************************
+*/
+
+#ifndef LOCALSVC_H
+#define LOCALSVC_H
+
+#include "unicode/utypes.h"
+
+#if U_LOCAL_SERVICE_HOOK
+/**
+ * Prototype for user-supplied service hook. This function is expected to return
+ * a type of factory object specific to the requested service.
+ * 
+ * @param what service-specific string identifying the specific user hook
+ * @param status error status
+ * @return a service-specific hook, or NULL on failure.
+ */
+U_CAPI void* uprv_svc_hook(const char *what, UErrorCode *status);
+#endif
+
+#endif
diff --git a/source/common/locbased.cpp b/source/common/locbased.cpp
new file mode 100644
index 0000000..e96b9f7
--- /dev/null
+++ b/source/common/locbased.cpp
@@ -0,0 +1,46 @@
+/*
+**********************************************************************
+* Copyright (c) 2004, International Business Machines
+* Corporation and others.  All Rights Reserved.
+**********************************************************************
+* Author: Alan Liu
+* Created: January 16 2004
+* Since: ICU 2.8
+**********************************************************************
+*/
+#include "locbased.h"
+#include "cstring.h"
+
+U_NAMESPACE_BEGIN
+
+Locale LocaleBased::getLocale(ULocDataLocaleType type, UErrorCode& status) const {
+    const char* id = getLocaleID(type, status);
+    return Locale((id != 0) ? id : "");
+}
+
+const char* LocaleBased::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const {
+    if (U_FAILURE(status)) {
+        return NULL;
+    }
+
+    switch(type) {
+    case ULOC_VALID_LOCALE:
+        return valid;
+    case ULOC_ACTUAL_LOCALE:
+        return actual;
+    default:
+        status = U_ILLEGAL_ARGUMENT_ERROR;
+        return NULL;
+    }
+}
+
+void LocaleBased::setLocaleIDs(const char* validID, const char* actualID) {
+    if (validID != 0) {
+        uprv_strcpy(valid, validID);
+    }
+    if (actualID != 0) {
+        uprv_strcpy(actual, actualID);
+    }
+}
+
+U_NAMESPACE_END
diff --git a/source/common/locbased.h b/source/common/locbased.h
new file mode 100644
index 0000000..366b151
--- /dev/null
+++ b/source/common/locbased.h
@@ -0,0 +1,97 @@
+/*
+**********************************************************************
+* Copyright (c) 2004, International Business Machines
+* Corporation and others.  All Rights Reserved.
+**********************************************************************
+* Author: Alan Liu
+* Created: January 16 2004
+* Since: ICU 2.8
+**********************************************************************
+*/
+#ifndef LOCBASED_H
+#define LOCBASED_H
+
+#include "unicode/locid.h"
+#include "unicode/uobject.h"
+
+/**
+ * Macro to declare a locale LocaleBased wrapper object for the given
+ * object, which must have two members named `validLocale' and
+ * `actualLocale'.
+ */
+#define U_LOCALE_BASED(varname, objname) \
+  LocaleBased varname((objname).validLocale, (objname).actualLocale);
+
+U_NAMESPACE_BEGIN
+
+/**
+ * A utility class that unifies the implementation of getLocale() by
+ * various ICU services.  This class is likely to be removed in the
+ * ICU 3.0 time frame in favor of an integrated approach with the
+ * services framework.
+ * @since ICU 2.8
+ */
+class U_COMMON_API LocaleBased : public UMemory {
+
+ public:
+
+    /**
+     * Construct a LocaleBased wrapper around the two pointers.  These
+     * will be aliased for the lifetime of this object.
+     */
+    inline LocaleBased(char* validAlias, char* actualAlias);
+
+    /**
+     * Construct a LocaleBased wrapper around the two const pointers.
+     * These will be aliased for the lifetime of this object.
+     */
+    inline LocaleBased(const char* validAlias, const char* actualAlias);
+
+    /**
+     * Return locale meta-data for the service object wrapped by this
+     * object.  Either the valid or the actual locale may be
+     * retrieved.
+     * @param type either ULOC_VALID_LOCALE or ULOC_ACTUAL_LOCALE
+     * @param status input-output error code
+     * @return the indicated locale
+     */
+    Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
+
+    /**
+     * Return the locale ID for the service object wrapped by this
+     * object.  Either the valid or the actual locale may be
+     * retrieved.
+     * @param type either ULOC_VALID_LOCALE or ULOC_ACTUAL_LOCALE
+     * @param status input-output error code
+     * @return the indicated locale ID
+     */
+    const char* getLocaleID(ULocDataLocaleType type, UErrorCode& status) const;
+
+    /**
+     * Set the locale meta-data for the service object wrapped by this
+     * object.  If either parameter is zero, it is ignored.
+     * @param valid the ID of the valid locale
+     * @param actual the ID of the actual locale
+     */
+    void setLocaleIDs(const char* valid, const char* actual);
+
+ private:
+
+    char* valid;
+    
+    char* actual;
+};
+
+inline LocaleBased::LocaleBased(char* validAlias, char* actualAlias) :
+    valid(validAlias), actual(actualAlias) {
+}
+
+inline LocaleBased::LocaleBased(const char* validAlias,
+                                const char* actualAlias) :
+    // ugh: cast away const
+    valid((char*)validAlias), actual((char*)actualAlias) {
+}
+
+U_NAMESPACE_END
+
+#endif
diff --git a/source/common/locid.cpp b/source/common/locid.cpp
new file mode 100644
index 0000000..848a1d7
--- /dev/null
+++ b/source/common/locid.cpp
@@ -0,0 +1,1330 @@
+/*
+ **********************************************************************
+ *   Copyright (C) 1997-2007, International Business Machines
+ *   Corporation and others.  All Rights Reserved.
+ **********************************************************************
+*
+* File locid.cpp
+*
+* Created by: Richard Gillam
+*
+* Modification History:
+*
+*   Date        Name        Description
+*   02/11/97    aliu        Changed gLocPath to fgDataDirectory and added
+*                           methods to get and set it.
+*   04/02/97    aliu        Made operator!= inline; fixed return value
+*                           of getName().
+*   04/15/97    aliu        Cleanup for AIX/Win32.
+*   04/24/97    aliu        Numerous changes per code review.
+*   08/18/98    stephen     Changed getDisplayName()
+*                           Added SIMPLIFIED_CHINESE, TRADITIONAL_CHINESE
+*                           Added getISOCountries(), getISOLanguages(),
+*                           getLanguagesForCountry()
+*   03/16/99    bertrand    rehaul.
+*   07/21/99    stephen     Added U_CFUNC setDefault
+*   11/09/99    weiv        Added const char * getName() const;
+*   04/12/00    srl         removing unicodestring api's and cached hash code
+*   08/10/01    grhoten     Change the static Locales to accessor functions
+******************************************************************************
+*/
+
+
+#include "unicode/locid.h"
+#include "unicode/uloc.h"
+#include "umutex.h"
+#include "uassert.h"
+#include "cmemory.h"
+#include "cstring.h"
+#include "uhash.h"
+#include "ucln_cmn.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+static U_NAMESPACE_QUALIFIER Locale*  availableLocaleList = NULL;
+static int32_t  availableLocaleListCount;
+typedef enum ELocalePos {
+    eENGLISH,
+    eFRENCH,
+    eGERMAN,
+    eITALIAN,
+    eJAPANESE,
+    eKOREAN,
+    eCHINESE,
+
+    eFRANCE,
+    eGERMANY,
+    eITALY,
+    eJAPAN,
+    eKOREA,
+    eCHINA,      /* Alias for PRC */
+    eTAIWAN,
+    eUK,
+    eUS,
+    eCANADA,
+    eCANADA_FRENCH,
+
+
+    //eDEFAULT,
+    eMAX_LOCALES
+} ELocalePos;
+
+U_CFUNC int32_t locale_getKeywords(const char *localeID,
+            char prev,
+            char *keywords, int32_t keywordCapacity,
+            char *values, int32_t valuesCapacity, int32_t *valLen,
+            UBool valuesToo,
+            UErrorCode *status);
+
+static U_NAMESPACE_QUALIFIER Locale *gLocaleCache         = NULL;
+static U_NAMESPACE_QUALIFIER Locale *gDefaultLocale       = NULL;
+static UHashtable                   *gDefaultLocalesHashT = NULL;
+
+U_CDECL_BEGIN
+//
+// Deleter function for Locales owned by the default Locale hash table/
+//
+static void U_CALLCONV
+deleteLocale(void *obj) {
+    delete (U_NAMESPACE_QUALIFIER Locale *) obj;
+}
+
+static UBool U_CALLCONV locale_cleanup(void)
+{
+    U_NAMESPACE_USE
+
+    if (availableLocaleList) {
+        delete []availableLocaleList;
+        availableLocaleList = NULL;
+    }
+    availableLocaleListCount = 0;
+
+    if (gLocaleCache) {
+        delete [] gLocaleCache;
+        gLocaleCache = NULL;
+    }
+
+    if (gDefaultLocalesHashT) {
+        uhash_close(gDefaultLocalesHashT);   // Automatically deletes all elements, using deleter func.
+        gDefaultLocalesHashT = NULL;
+    }
+    else if (gDefaultLocale) {
+        // The cache wasn't created, and only one default locale was created.
+        delete gDefaultLocale;
+    }
+    gDefaultLocale = NULL;
+
+    return TRUE;
+}
+U_CDECL_END
+
+U_NAMESPACE_BEGIN
+//
+//  locale_set_default_internal.
+//
+void locale_set_default_internal(const char *id)
+{
+    UErrorCode   status = U_ZERO_ERROR;
+    UBool canonicalize = FALSE;
+
+    // If given a NULL string for the locale id, grab the default
+    //   name from the system.
+    //   (Different from most other locale APIs, where a null name means use
+    //    the current ICU default locale.)
+    if (id == NULL) {
+        umtx_lock(NULL);
+        id = uprv_getDefaultLocaleID();
+        umtx_unlock(NULL);
+        canonicalize = TRUE; // always canonicalize host ID
+    }
+
+    // put the locale id into a canonical form,
+    //   in preparation for looking up this locale in the hash table of
+    //   already-created locale objects.
+    //
+    status = U_ZERO_ERROR;
+    char localeNameBuf[512];
+
+    if (canonicalize) {
+        uloc_canonicalize(id, localeNameBuf, sizeof(localeNameBuf)-1, &status);
+    } else {
+        uloc_getName(id, localeNameBuf, sizeof(localeNameBuf)-1, &status);
+    }
+    localeNameBuf[sizeof(localeNameBuf)-1] = 0;  // Force null termination in event of
+                                                 //   a long name filling the buffer.
+                                                 //   (long names are truncated.)
+
+    // Lazy creation of the hash table itself, if needed.
+    UBool isOnlyLocale;
+    UMTX_CHECK(NULL, (gDefaultLocale == NULL), isOnlyLocale);
+    if (isOnlyLocale) {
+        // We haven't seen this locale id before.
+        // Create a new Locale object for it.
+        Locale *newFirstDefault = new Locale(Locale::eBOGUS);
+        if (newFirstDefault == NULL) {
+            // No way to report errors from here.
+            return;
+        }
+        newFirstDefault->init(localeNameBuf, FALSE);
+        umtx_lock(NULL);
+        if (gDefaultLocale == NULL) {
+            gDefaultLocale = newFirstDefault;  // Assignment to gDefaultLocale must happen inside mutex
+            newFirstDefault = NULL;
+            ucln_common_registerCleanup(UCLN_COMMON_LOCALE, locale_cleanup);
+        }
+        // Else some other thread raced us through here, and set the new Locale.
+        // Use the hash table next.
+        umtx_unlock(NULL);
+        if (newFirstDefault == NULL) {
+            // We were successful in setting the locale, and we were the first one to set it.
+            return;
+        }
+        // else start using the hash table.
+    }
+
+    // Lazy creation of the hash table itself, if needed.
+    UBool hashTableNeedsInit;
+    UMTX_CHECK(NULL, (gDefaultLocalesHashT == NULL), hashTableNeedsInit);
+    if (hashTableNeedsInit) {
+        status = U_ZERO_ERROR;
+        UHashtable *tHashTable = uhash_open(uhash_hashChars, uhash_compareChars, NULL, &status);
+        if (U_FAILURE(status)) {
+            return;
+        }
+        uhash_setValueDeleter(tHashTable, deleteLocale);
+        umtx_lock(NULL);
+        if (gDefaultLocalesHashT == NULL) {
+            gDefaultLocalesHashT = tHashTable;
+            ucln_common_registerCleanup(UCLN_COMMON_LOCALE, locale_cleanup);
+        } else {
+            uhash_close(tHashTable);
+            hashTableNeedsInit = FALSE;
+        }
+        umtx_unlock(NULL);
+    }
+
+    // Hash table lookup, key is the locale full name
+    umtx_lock(NULL);
+    Locale *newDefault = (Locale *)uhash_get(gDefaultLocalesHashT, localeNameBuf);
+    if (newDefault != NULL) {
+        // We have the requested locale in the hash table already.
+        // Just set it as default.  Inside the mutex lock, for those troublesome processors.
+        gDefaultLocale = newDefault;
+        umtx_unlock(NULL);
+    } else {
+        umtx_unlock(NULL);
+        // We haven't seen this locale id before.
+        // Create a new Locale object for it.
+        newDefault = new Locale(Locale::eBOGUS);
+        if (newDefault == NULL) {
+            // No way to report errors from here.
+            return;
+        }
+        newDefault->init(localeNameBuf, FALSE);
+
+        // Add newly created Locale to the hash table of default Locales
+        const char *key = newDefault->getName();
+        U_ASSERT(uprv_strcmp(key, localeNameBuf) == 0);
+        umtx_lock(NULL);
+        Locale *hashTableVal = (Locale *)uhash_get(gDefaultLocalesHashT, key);
+        if (hashTableVal == NULL) {
+            if (hashTableNeedsInit) {
+                // This is the second request to set the locale.
+                // Cache the first one.
+                uhash_put(gDefaultLocalesHashT, (void *)gDefaultLocale->getName(), gDefaultLocale, &status);
+            }
+            uhash_put(gDefaultLocalesHashT, (void *)key, newDefault, &status);
+            gDefaultLocale = newDefault;
+            // ignore errors from hash table insert.  (Couldn't do anything anyway)
+            // We can still set the default Locale,
+            //  it just wont be cached, and will eventually leak.
+        } else {
+            // Some other thread raced us through here, and got the new Locale
+            //   into the hash table before us.  Use that one.
+            gDefaultLocale = hashTableVal;  // Assignment to gDefaultLocale must happen inside mutex
+            delete newDefault;
+        }
+        umtx_unlock(NULL);
+    }
+}
+U_NAMESPACE_END
+
+/* sfb 07/21/99 */
+U_CFUNC void
+locale_set_default(const char *id)
+{
+    U_NAMESPACE_USE
+    locale_set_default_internal(id);
+}
+/* end */
+
+U_CFUNC const char *
+locale_get_default(void)
+{
+    U_NAMESPACE_USE
+
+    return Locale::getDefault().getName();
+}
+
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Locale)
+
+/*Character separating the posix id fields*/
+// '_'
+// In the platform codepage.
+#define SEP_CHAR '_'
+
+Locale::~Locale()
+{
+    /*if fullName is on the heap, we free it*/
+    if (fullName != fullNameBuffer)
+    {
+        uprv_free(fullName);
+        fullName = NULL;
+    }
+    if (baseName && baseName != baseNameBuffer) {
+        uprv_free(baseName);
+        baseName = NULL;
+    }
+}
+
+Locale::Locale()
+    : UObject(), fullName(fullNameBuffer), baseName(NULL)
+{
+    init(NULL, FALSE);
+}
+
+/*
+ * Internal constructor to allow construction of a locale object with
+ *   NO side effects.   (Default constructor tries to get
+ *   the default locale.)
+ */
+Locale::Locale(Locale::ELocaleType)
+    : UObject(), fullName(fullNameBuffer), baseName(NULL)
+{
+    setToBogus();
+}
+
+
+Locale::Locale( const   char * newLanguage,
+                const   char * newCountry,
+                const   char * newVariant,
+                const   char * newKeywords)
+    : UObject(), fullName(fullNameBuffer), baseName(NULL)
+{
+    if( (newLanguage==NULL) && (newCountry == NULL) && (newVariant == NULL) )
+    {
+        init(NULL, FALSE); /* shortcut */
+    }
+    else
+    {
+        char togo_stack[ULOC_FULLNAME_CAPACITY];
+        char *togo;
+        char *togo_heap = NULL;
+        int32_t size = 0;
+        int32_t lsize = 0;
+        int32_t csize = 0;
+        int32_t vsize = 0;
+        int32_t ksize = 0;
+        char    *p;
+
+        // Calculate the size of the resulting string.
+
+        // Language
+        if ( newLanguage != NULL )
+        {
+            lsize = (int32_t)uprv_strlen(newLanguage);
+            size = lsize;
+        }
+
+        // _Country
+        if ( newCountry != NULL )
+        {
+            csize = (int32_t)uprv_strlen(newCountry);
+            size += csize;
+        }
+
+        // _Variant
+        if ( newVariant != NULL )
+        {
+            // remove leading _'s
+            while(newVariant[0] == SEP_CHAR)
+            {
+                newVariant++;
+            }
+
+            // remove trailing _'s
+            vsize = (int32_t)uprv_strlen(newVariant);
+            while( (vsize>1) && (newVariant[vsize-1] == SEP_CHAR) )
+            {
+                vsize--;
+            }
+        }
+
+        if( vsize > 0 )
+        {
+            size += vsize;
+        }
+
+        // Separator rules:
+        if ( vsize > 0 )
+        {
+            size += 2;  // at least: __v
+        }
+        else if ( csize > 0 )
+        {
+            size += 1;  // at least: _v
+        }
+
+        if ( newKeywords != NULL)
+        {
+            ksize = (int32_t)uprv_strlen(newKeywords);
+            size += ksize + 1;
+        }
+
+
+        //  NOW we have the full locale string..
+
+        /*if the whole string is longer than our internal limit, we need
+        to go to the heap for temporary buffers*/
+        if (size >= ULOC_FULLNAME_CAPACITY)
+        {
+            togo_heap = (char *)uprv_malloc(sizeof(char)*(size+1));
+            togo = togo_heap;
+        }
+        else
+        {
+            togo = togo_stack;
+        }
+
+        togo[0] = 0;
+
+        // Now, copy it back.
+        p = togo;
+        if ( lsize != 0 )
+        {
+            uprv_strcpy(p, newLanguage);
+            p += lsize;
+        }
+
+        if ( ( vsize != 0 ) || (csize != 0) )  // at least:  __v
+        {                                      //            ^
+            *p++ = SEP_CHAR;
+        }
+
+        if ( csize != 0 )
+        {
+            uprv_strcpy(p, newCountry);
+            p += csize;
+        }
+
+        if ( vsize != 0)
+        {
+            *p++ = SEP_CHAR; // at least: __v
+
+            uprv_strncpy(p, newVariant, vsize);  // Must use strncpy because
+            p += vsize;                          // of trimming (above).
+            *p = 0; // terminate
+        }
+
+        if ( ksize != 0)
+        {
+            if (uprv_strchr(newKeywords, '=')) {
+                *p++ = '@'; /* keyword parsing */
+            }
+            else {
+                *p++ = '_'; /* Variant parsing with a script */
+                if ( vsize == 0) {
+                    *p++ = '_'; /* No country found */
+                }
+            }
+            uprv_strcpy(p, newKeywords);
+            p += ksize;
+        }
+
+        // Parse it, because for example 'language' might really be a complete
+        // string.
+        init(togo, FALSE);
+
+        if (togo_heap) {
+            uprv_free(togo_heap);
+        }
+    }
+}
+
+Locale::Locale(const Locale &other)
+    : UObject(other), fullName(fullNameBuffer), baseName(NULL)
+{
+    *this = other;
+}
+
+Locale &Locale::operator=(const Locale &other)
+{
+    if (this == &other) {
+        return *this;
+    }
+
+    if (&other == NULL) {
+        this->setToBogus();
+        return *this;
+    }
+
+    /* Free our current storage */
+    if(fullName != fullNameBuffer) {
+        uprv_free(fullName);
+        fullName = fullNameBuffer;
+    }
+
+    /* Allocate the full name if necessary */
+    if(other.fullName != other.fullNameBuffer) {
+        fullName = (char *)uprv_malloc(sizeof(char)*(uprv_strlen(other.fullName)+1));
+    }
+    /* Copy the full name */
+    uprv_strcpy(fullName, other.fullName);
+
+    /* baseName is the cached result of getBaseName.  if 'other' has a
+       baseName and it fits in baseNameBuffer, then copy it. otherwise set
+       it to NULL, and let the user lazy-create it (in getBaseName) if they
+       want it. */
+    if(baseName && baseName != baseNameBuffer) {
+        uprv_free(baseName);
+    }
+    baseName = NULL;
+
+    if(other.baseName == other.baseNameBuffer) {
+        uprv_strcpy(baseNameBuffer, other.baseNameBuffer);
+        baseName = baseNameBuffer;
+    }
+
+    /* Copy the language and country fields */
+    uprv_strcpy(language, other.language);
+    uprv_strcpy(script, other.script);
+    uprv_strcpy(country, other.country);
+
+    /* The variantBegin is an offset into fullName, just copy it */
+    variantBegin = other.variantBegin;
+    fIsBogus = other.fIsBogus;
+    return *this;
+}
+
+Locale *
+Locale::clone() const {
+    return new Locale(*this);
+}
+
+UBool
+Locale::operator==( const   Locale& other) const
+{
+    return (uprv_strcmp(other.fullName, fullName) == 0);
+}
+
+/*This function initializes a Locale from a C locale ID*/
+Locale& Locale::init(const char* localeID, UBool canonicalize)
+{
+    fIsBogus = FALSE;
+    /* Free our current storage */
+    if(fullName != fullNameBuffer) {
+        uprv_free(fullName);
+        fullName = fullNameBuffer;
+    }
+
+    if(baseName && baseName != baseNameBuffer) {
+        uprv_free(baseName);
+        baseName = NULL;
+    }
+
+    // not a loop:
+    // just an easy way to have a common error-exit
+    // without goto and without another function
+    do {
+        char *separator;
+        char *field[5] = {0};
+        int32_t fieldLen[5] = {0};
+        int32_t fieldIdx;
+        int32_t variantField;
+        int32_t length;
+        UErrorCode err;
+
+        if(localeID == NULL) {
+            // not an error, just set the default locale
+            return *this = getDefault();
+        }
+
+        /* preset all fields to empty */
+        language[0] = script[0] = country[0] = 0;
+
+        // "canonicalize" the locale ID to ICU/Java format
+        err = U_ZERO_ERROR;
+        length = canonicalize ?
+            uloc_canonicalize(localeID, fullName, sizeof(fullNameBuffer), &err) :
+            uloc_getName(localeID, fullName, sizeof(fullNameBuffer), &err);
+
+        if(err == U_BUFFER_OVERFLOW_ERROR || length >= (int32_t)sizeof(fullNameBuffer)) {
+            /*Go to heap for the fullName if necessary*/
+            fullName = (char *)uprv_malloc(sizeof(char)*(length + 1));
+            if(fullName == 0) {
+                fullName = fullNameBuffer;
+                break; // error: out of memory
+            }
+            err = U_ZERO_ERROR;
+            length = canonicalize ?
+                uloc_canonicalize(localeID, fullName, length+1, &err) :
+                uloc_getName(localeID, fullName, length+1, &err);
+        }
+        if(U_FAILURE(err) || err == U_STRING_NOT_TERMINATED_WARNING) {
+            /* should never occur */
+            break;
+        }
+
+        variantBegin = length;
+
+        /* after uloc_getName/canonicalize() we know that only '_' are separators */
+        separator = field[0] = fullName;
+        fieldIdx = 1;
+        while ((separator = uprv_strchr(field[fieldIdx-1], SEP_CHAR)) && fieldIdx < (int32_t)(sizeof(field)/sizeof(field[0]))-1) {
+            field[fieldIdx] = separator + 1;
+            fieldLen[fieldIdx-1] = (int32_t)(separator - field[fieldIdx-1]);
+            fieldIdx++;
+        }
+        // variant may contain @foo or .foo POSIX cruft; remove it
+        separator = uprv_strchr(field[fieldIdx-1], '@');
+        char* sep2 = uprv_strchr(field[fieldIdx-1], '.');
+        if (separator!=NULL || sep2!=NULL) {
+            if (separator==NULL || (sep2!=NULL && separator > sep2)) {
+                separator = sep2;
+            }
+            fieldLen[fieldIdx-1] = (int32_t)(separator - field[fieldIdx-1]);
+        } else {
+            fieldLen[fieldIdx-1] = length - (int32_t)(field[fieldIdx-1] - fullName);
+        }
+
+        if (fieldLen[0] >= (int32_t)(sizeof(language))
+            || (fieldLen[1] == 4 && fieldLen[2] >= (int32_t)(sizeof(country)))
+            || (fieldLen[1] != 4 && fieldLen[1] >= (int32_t)(sizeof(country))))
+        {
+            break; // error: one of the fields is too long
+        }
+
+        variantField = 2; /* Usually the 2nd one, except when a script is used. */
+        if (fieldLen[0] > 0) {
+            /* We have a language */
+            uprv_memcpy(language, fullName, fieldLen[0]);
+            language[fieldLen[0]] = 0;
+        }
+        if (fieldLen[1] == 4) {
+            /* We have at least a script */
+            uprv_memcpy(script, field[1], fieldLen[1]);
+            script[fieldLen[1]] = 0;
+            variantField = 3;
+            if (fieldLen[2] > 0) {
+                /* We have a country */
+                uprv_memcpy(country, field[2], fieldLen[2]);
+                country[fieldLen[2]] = 0;
+            }
+        }
+        else if (fieldLen[1] > 0) {
+            /* We have a country and no script */
+            uprv_memcpy(country, field[1], fieldLen[1]);
+            country[fieldLen[1]] = 0;
+        }
+        if (variantField > 0 && fieldLen[variantField] > 0) {
+            /* We have a variant */
+            variantBegin = (int32_t)(field[variantField] - fullName);
+        }
+
+        // successful end of init()
+        return *this;
+    } while(0); /*loop doesn't iterate*/
+
+    // when an error occurs, then set this object to "bogus" (there is no UErrorCode here)
+    setToBogus();
+
+    return *this;
+}
+
+int32_t
+Locale::hashCode() const
+{
+    UHashTok hashKey;
+    hashKey.pointer = fullName;
+    return uhash_hashChars(hashKey);
+}
+
+void
+Locale::setToBogus() {
+    /* Free our current storage */
+    if(fullName != fullNameBuffer) {
+        uprv_free(fullName);
+        fullName = fullNameBuffer;
+    }
+    *fullNameBuffer = 0;
+    *language = 0;
+    *script = 0;
+    *country = 0;
+    fIsBogus = TRUE;
+}
+
+const Locale& U_EXPORT2
+Locale::getDefault()
+{
+    const Locale *retLocale;
+    UMTX_CHECK(NULL, gDefaultLocale, retLocale);
+    if (retLocale == NULL) {
+        locale_set_default_internal(NULL);
+        umtx_lock(NULL);
+        // Need a mutex  in case some other thread set a new
+        // default inbetween when we set and when we get the new default.  For
+        // processors with weak memory coherency, we might not otherwise see all
+        // of the newly created new default locale.
+        retLocale = gDefaultLocale;
+        umtx_unlock(NULL);
+    }
+    return *retLocale;
+}
+
+
+
+void U_EXPORT2
+Locale::setDefault( const   Locale&     newLocale,
+                            UErrorCode&  status)
+{
+    if (U_FAILURE(status)) {
+        return;
+    }
+
+    /* Set the default from the full name string of the supplied locale.
+     * This is a convenient way to access the default locale caching mechanisms.
+     */
+    const char *localeID = newLocale.getName();
+    locale_set_default_internal(localeID);
+}
+
+Locale U_EXPORT2
+Locale::createFromName (const char *name)
+{
+    if (name) {
+        Locale l("");
+        l.init(name, FALSE);
+        return l;
+    }
+    else {
+        return getDefault();
+    }
+}
+
+Locale U_EXPORT2
+Locale::createCanonical(const char* name) {
+    Locale loc("");
+    loc.init(name, TRUE);
+    return loc;
+}
+
+const char *
+Locale::getISO3Language() const
+{
+    return uloc_getISO3Language(fullName);
+}
+
+
+const char *
+Locale::getISO3Country() const
+{
+    return uloc_getISO3Country(fullName);
+}
+
+/**
+ * Return the LCID value as specified in the "LocaleID" resource for this
+ * locale.  The LocaleID must be expressed as a hexadecimal number, from
+ * one to four digits.  If the LocaleID resource is not present, or is
+ * in an incorrect format, 0 is returned.  The LocaleID is for use in
+ * Windows (it is an LCID), but is available on all platforms.
+ */
+uint32_t
+Locale::getLCID() const
+{
+    return uloc_getLCID(fullName);
+}
+
+UnicodeString&
+Locale::getDisplayLanguage(UnicodeString& dispLang) const
+{
+    return this->getDisplayLanguage(getDefault(), dispLang);
+}
+
+/*We cannot make any assumptions on the size of the output display strings
+* Yet, since we are calling through to a C API, we need to set limits on
+* buffer size. For all the following getDisplay functions we first attempt
+* to fill up a stack allocated buffer. If it is to small we heap allocated
+* the exact buffer we need copy it to the UnicodeString and delete it*/
+
+UnicodeString&
+Locale::getDisplayLanguage(const Locale &displayLocale,
+                           UnicodeString &result) const {
+    UChar *buffer;
+    UErrorCode errorCode=U_ZERO_ERROR;
+    int32_t length;
+
+    buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY);
+    if(buffer==0) {
+        result.truncate(0);
+        return result;
+    }
+
+    length=uloc_getDisplayLanguage(fullName, displayLocale.fullName,
+                                   buffer, result.getCapacity(),
+                                   &errorCode);
+    result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+
+    if(errorCode==U_BUFFER_OVERFLOW_ERROR) {
+        buffer=result.getBuffer(length);
+        if(buffer==0) {
+            result.truncate(0);
+            return result;
+        }
+        errorCode=U_ZERO_ERROR;
+        length=uloc_getDisplayLanguage(fullName, displayLocale.fullName,
+                                       buffer, result.getCapacity(),
+                                       &errorCode);
+        result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+    }
+
+    return result;
+}
+
+UnicodeString&
+Locale::getDisplayScript(UnicodeString& dispScript) const
+{
+    return this->getDisplayScript(getDefault(), dispScript);
+}
+
+UnicodeString&
+Locale::getDisplayScript(const Locale &displayLocale,
+                          UnicodeString &result) const {
+    UChar *buffer;
+    UErrorCode errorCode=U_ZERO_ERROR;
+    int32_t length;
+
+    buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY);
+    if(buffer==0) {
+        result.truncate(0);
+        return result;
+    }
+
+    length=uloc_getDisplayScript(fullName, displayLocale.fullName,
+                                  buffer, result.getCapacity(),
+                                  &errorCode);
+    result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+
+    if(errorCode==U_BUFFER_OVERFLOW_ERROR) {
+        buffer=result.getBuffer(length);
+        if(buffer==0) {
+            result.truncate(0);
+            return result;
+        }
+        errorCode=U_ZERO_ERROR;
+        length=uloc_getDisplayScript(fullName, displayLocale.fullName,
+                                      buffer, result.getCapacity(),
+                                      &errorCode);
+        result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+    }
+
+    return result;
+}
+
+UnicodeString&
+Locale::getDisplayCountry(UnicodeString& dispCntry) const
+{
+    return this->getDisplayCountry(getDefault(), dispCntry);
+}
+
+UnicodeString&
+Locale::getDisplayCountry(const Locale &displayLocale,
+                          UnicodeString &result) const {
+    UChar *buffer;
+    UErrorCode errorCode=U_ZERO_ERROR;
+    int32_t length;
+
+    buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY);
+    if(buffer==0) {
+        result.truncate(0);
+        return result;
+    }
+
+    length=uloc_getDisplayCountry(fullName, displayLocale.fullName,
+                                  buffer, result.getCapacity(),
+                                  &errorCode);
+    result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+
+    if(errorCode==U_BUFFER_OVERFLOW_ERROR) {
+        buffer=result.getBuffer(length);
+        if(buffer==0) {
+            result.truncate(0);
+            return result;
+        }
+        errorCode=U_ZERO_ERROR;
+        length=uloc_getDisplayCountry(fullName, displayLocale.fullName,
+                                      buffer, result.getCapacity(),
+                                      &errorCode);
+        result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+    }
+
+    return result;
+}
+
+UnicodeString&
+Locale::getDisplayVariant(UnicodeString& dispVar) const
+{
+    return this->getDisplayVariant(getDefault(), dispVar);
+}
+
+UnicodeString&
+Locale::getDisplayVariant(const Locale &displayLocale,
+                          UnicodeString &result) const {
+    UChar *buffer;
+    UErrorCode errorCode=U_ZERO_ERROR;
+    int32_t length;
+
+    buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY);
+    if(buffer==0) {
+        result.truncate(0);
+        return result;
+    }
+
+    length=uloc_getDisplayVariant(fullName, displayLocale.fullName,
+                                  buffer, result.getCapacity(),
+                                  &errorCode);
+    result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+
+    if(errorCode==U_BUFFER_OVERFLOW_ERROR) {
+        buffer=result.getBuffer(length);
+        if(buffer==0) {
+            result.truncate(0);
+            return result;
+        }
+        errorCode=U_ZERO_ERROR;
+        length=uloc_getDisplayVariant(fullName, displayLocale.fullName,
+                                      buffer, result.getCapacity(),
+                                      &errorCode);
+        result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+    }
+
+    return result;
+}
+
+UnicodeString&
+Locale::getDisplayName( UnicodeString& name ) const
+{
+    return this->getDisplayName(getDefault(), name);
+}
+
+UnicodeString&
+Locale::getDisplayName(const Locale &displayLocale,
+                       UnicodeString &result) const {
+    UChar *buffer;
+    UErrorCode errorCode=U_ZERO_ERROR;
+    int32_t length;
+
+    buffer=result.getBuffer(ULOC_FULLNAME_CAPACITY);
+    if(buffer==0) {
+        result.truncate(0);
+        return result;
+    }
+
+    length=uloc_getDisplayName(fullName, displayLocale.fullName,
+                               buffer, result.getCapacity(),
+                               &errorCode);
+    result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+
+    if(errorCode==U_BUFFER_OVERFLOW_ERROR) {
+        buffer=result.getBuffer(length);
+        if(buffer==0) {
+            result.truncate(0);
+            return result;
+        }
+        errorCode=U_ZERO_ERROR;
+        length=uloc_getDisplayName(fullName, displayLocale.fullName,
+                                   buffer, result.getCapacity(),
+                                   &errorCode);
+        result.releaseBuffer(U_SUCCESS(errorCode) ? length : 0);
+    }
+
+    return result;
+}
+const Locale* U_EXPORT2
+Locale::getAvailableLocales(int32_t& count)
+{
+    // for now, there is a hardcoded list, so just walk through that list and set it up.
+    UBool needInit;
+    UMTX_CHECK(NULL, availableLocaleList == NULL, needInit);
+
+    if (needInit) {
+        int32_t locCount = uloc_countAvailable();
+        Locale *newLocaleList = 0;
+        if(locCount) {
+           newLocaleList = new Locale[locCount];
+        }
+        if (newLocaleList == NULL) {
+            count = 0;
+            return NULL;
+        }
+
+        count = locCount;
+
+        while(--locCount >= 0) {
+            newLocaleList[locCount].setFromPOSIXID(uloc_getAvailable(locCount));
+        }
+
+        umtx_lock(NULL);
+        if(availableLocaleList == 0) {
+            availableLocaleListCount = count;
+            availableLocaleList = newLocaleList;
+            newLocaleList = NULL;
+            ucln_common_registerCleanup(UCLN_COMMON_LOCALE, locale_cleanup);
+        }
+        umtx_unlock(NULL);
+        delete []newLocaleList;
+    }
+    count = availableLocaleListCount;
+    return availableLocaleList;
+}
+
+const char* const* U_EXPORT2 Locale::getISOCountries()
+{
+    return uloc_getISOCountries();
+}
+
+const char* const* U_EXPORT2 Locale::getISOLanguages()
+{
+    return uloc_getISOLanguages();
+}
+
+// Set the locale's data based on a posix id.
+void Locale::setFromPOSIXID(const char *posixID)
+{
+    init(posixID, TRUE);
+}
+
+const Locale & U_EXPORT2
+Locale::getEnglish(void)
+{
+    return getLocale(eENGLISH);
+}
+
+const Locale & U_EXPORT2
+Locale::getFrench(void)
+{
+    return getLocale(eFRENCH);
+}
+
+const Locale & U_EXPORT2
+Locale::getGerman(void)
+{
+    return getLocale(eGERMAN);
+}
+
+const Locale & U_EXPORT2
+Locale::getItalian(void)
+{
+    return getLocale(eITALIAN);
+}
+
+const Locale & U_EXPORT2
+Locale::getJapanese(void)
+{
+    return getLocale(eJAPANESE);
+}
+
+const Locale & U_EXPORT2
+Locale::getKorean(void)
+{
+    return getLocale(eKOREAN);
+}
+
+const Locale & U_EXPORT2
+Locale::getChinese(void)
+{
+    return getLocale(eCHINESE);
+}
+
+const Locale & U_EXPORT2
+Locale::getSimplifiedChinese(void)
+{
+    return getLocale(eCHINA);
+}
+
+const Locale & U_EXPORT2
+Locale::getTraditionalChinese(void)
+{
+    return getLocale(eTAIWAN);
+}
+
+
+const Locale & U_EXPORT2
+Locale::getFrance(void)
+{
+    return getLocale(eFRANCE);
+}
+
+const Locale & U_EXPORT2
+Locale::getGermany(void)
+{
+    return getLocale(eGERMANY);
+}
+
+const Locale & U_EXPORT2
+Locale::getItaly(void)
+{
+    return getLocale(eITALY);
+}
+
+const Locale & U_EXPORT2
+Locale::getJapan(void)
+{
+    return getLocale(eJAPAN);
+}
+
+const Locale & U_EXPORT2
+Locale::getKorea(void)
+{
+    return getLocale(eKOREA);
+}
+
+const Locale & U_EXPORT2
+Locale::getChina(void)
+{
+    return getLocale(eCHINA);
+}
+
+const Locale & U_EXPORT2
+Locale::getPRC(void)
+{
+    return getLocale(eCHINA);
+}
+
+const Locale & U_EXPORT2
+Locale::getTaiwan(void)
+{
+    return getLocale(eTAIWAN);
+}
+
+const Locale & U_EXPORT2
+Locale::getUK(void)
+{
+    return getLocale(eUK);
+}
+
+const Locale & U_EXPORT2
+Locale::getUS(void)
+{
+    return getLocale(eUS);
+}
+
+const Locale & U_EXPORT2
+Locale::getCanada(void)
+{
+    return getLocale(eCANADA);
+}
+
+const Locale & U_EXPORT2
+Locale::getCanadaFrench(void)
+{
+    return getLocale(eCANADA_FRENCH);
+}
+
+const Locale &
+Locale::getLocale(int locid)
+{
+    Locale *localeCache = getLocaleCache();
+    U_ASSERT((locid < eMAX_LOCALES)&&(locid>=0));
+    if (localeCache == NULL) {
+        // Failure allocating the locale cache.
+        //   The best we can do is return a NULL reference.
+        locid = 0;
+    }
+    return localeCache[locid]; /*operating on NULL*/
+}
+
+/*
+This function is defined this way in order to get around static
+initialization and static destruction.
+ */
+Locale *
+Locale::getLocaleCache(void)
+{
+    umtx_lock(NULL);
+    UBool needInit = (gLocaleCache == NULL);
+    umtx_unlock(NULL);
+
+    if (needInit) {
+        Locale *tLocaleCache = new Locale[(int)eMAX_LOCALES];
+        if (tLocaleCache == NULL) {
+            return NULL;
+        }
+        tLocaleCache[eENGLISH]       = Locale("en");
+        tLocaleCache[eFRENCH]        = Locale("fr");
+        tLocaleCache[eGERMAN]        = Locale("de");
+        tLocaleCache[eITALIAN]       = Locale("it");
+        tLocaleCache[eJAPANESE]      = Locale("ja");
+        tLocaleCache[eKOREAN]        = Locale("ko");
+        tLocaleCache[eCHINESE]       = Locale("zh");
+        tLocaleCache[eFRANCE]        = Locale("fr", "FR");
+        tLocaleCache[eGERMANY]       = Locale("de", "DE");
+        tLocaleCache[eITALY]         = Locale("it", "IT");
+        tLocaleCache[eJAPAN]         = Locale("ja", "JP");
+        tLocaleCache[eKOREA]         = Locale("ko", "KR");
+        tLocaleCache[eCHINA]         = Locale("zh", "CN");
+        tLocaleCache[eTAIWAN]        = Locale("zh", "TW");
+        tLocaleCache[eUK]            = Locale("en", "GB");
+        tLocaleCache[eUS]            = Locale("en", "US");
+        tLocaleCache[eCANADA]        = Locale("en", "CA");
+        tLocaleCache[eCANADA_FRENCH] = Locale("fr", "CA");
+
+        umtx_lock(NULL);
+        if (gLocaleCache == NULL) {
+            gLocaleCache = tLocaleCache;
+            tLocaleCache = NULL;
+            ucln_common_registerCleanup(UCLN_COMMON_LOCALE, locale_cleanup);
+        }
+        umtx_unlock(NULL);
+        if (tLocaleCache) {
+            delete [] tLocaleCache;  // Fancy array delete will destruct each member.
+        }
+    }
+    return gLocaleCache;
+}
+
+class KeywordEnumeration : public StringEnumeration {
+private:
+    char *keywords;
+    char *current;
+    int32_t length;
+    UnicodeString currUSKey;
+    static const char fgClassID;/* Warning this is used beyond the typical RTTI usage. */
+
+public:
+    static UClassID U_EXPORT2 getStaticClassID(void) { return (UClassID)&fgClassID; }
+    virtual UClassID getDynamicClassID(void) const { return getStaticClassID(); }
+public:
+    KeywordEnumeration(const char *keys, int32_t keywordLen, int32_t currentIndex, UErrorCode &status)
+        : keywords((char *)&fgClassID), current((char *)&fgClassID), length(0) {
+        if(U_SUCCESS(status) && keywordLen != 0) {
+            if(keys == NULL || keywordLen < 0) {
+                status = U_ILLEGAL_ARGUMENT_ERROR;
+            } else {
+                keywords = (char *)uprv_malloc(keywordLen+1);
+                if (keywords == NULL) {
+                    status = U_MEMORY_ALLOCATION_ERROR;
+                }
+                else {
+                    uprv_memcpy(keywords, keys, keywordLen);
+                    keywords[keywordLen] = 0;
+                    current = keywords + currentIndex;
+                    length = keywordLen;
+                }
+            }
+        }
+    }
+
+    virtual ~KeywordEnumeration() {
+        uprv_free(keywords);
+    }
+
+    virtual StringEnumeration * clone() const
+    {
+        UErrorCode status = U_ZERO_ERROR;
+        return new KeywordEnumeration(keywords, length, (int32_t)(current - keywords), status);
+    }
+
+    virtual int32_t count(UErrorCode &/*status*/) const {
+        char *kw = keywords;
+        int32_t result = 0;
+        while(*kw) {
+            result++;
+            kw += uprv_strlen(kw)+1;
+        }
+        return result;
+    }
+
+    virtual const char* next(int32_t* resultLength, UErrorCode& status) {
+        const char* result;
+        int32_t len;
+        if(U_SUCCESS(status) && *current != 0) {
+            result = current;
+            len = (int32_t)uprv_strlen(current);
+            current += len+1;
+            if(resultLength != NULL) {
+                *resultLength = len;
+            }
+        } else {
+            if(resultLength != NULL) {
+                *resultLength = 0;
+            }
+            result = NULL;
+        }
+        return result;
+    }
+
+    virtual const UnicodeString* snext(UErrorCode& status) {
+        int32_t resultLength = 0;
+        const char *s = next(&resultLength, status);
+        return setChars(s, resultLength, status);
+    }
+
+    virtual void reset(UErrorCode& /*status*/) {
+        current = keywords;
+    }
+};
+
+const char KeywordEnumeration::fgClassID = '\0';
+
+StringEnumeration *
+Locale::createKeywords(UErrorCode &status) const
+{
+    char keywords[256];
+    int32_t keywordCapacity = 256;
+    StringEnumeration *result = NULL;
+
+    const char* variantStart = uprv_strchr(fullName, '@');
+    const char* assignment = uprv_strchr(fullName, '=');
+    if(variantStart) {
+        if(assignment > variantStart) {
+            int32_t keyLen = locale_getKeywords(variantStart+1, '@', keywords, keywordCapacity, NULL, 0, NULL, FALSE, &status);
+            if(keyLen) {
+                result = new KeywordEnumeration(keywords, keyLen, 0, status);
+            }
+        } else {
+            status = U_INVALID_FORMAT_ERROR;
+        }
+    }
+    return result;
+}
+
+int32_t
+Locale::getKeywordValue(const char* keywordName, char *buffer, int32_t bufLen, UErrorCode &status) const
+{
+    return uloc_getKeywordValue(fullName, keywordName, buffer, bufLen, &status);
+}
+
+const char *
+Locale::getBaseName() const
+{
+    // lazy init
+    UErrorCode status = U_ZERO_ERROR;
+    // semantically const
+    if(baseName == 0) {
+        ((Locale *)this)->baseName = ((Locale *)this)->baseNameBuffer;
+        int32_t baseNameSize = uloc_getBaseName(fullName, baseName, ULOC_FULLNAME_CAPACITY, &status);
+        if(baseNameSize >= ULOC_FULLNAME_CAPACITY) {
+            ((Locale *)this)->baseName = (char *)uprv_malloc(sizeof(char) * baseNameSize + 1);
+            uloc_getBaseName(fullName, baseName, baseNameSize+1, &status);
+        }
+        baseName[baseNameSize] = 0;
+    }
+    return baseName;
+}
+
+
+//eof
+U_NAMESPACE_END
diff --git a/source/common/locmap.c b/source/common/locmap.c
new file mode 100644
index 0000000..802c6c3
--- /dev/null
+++ b/source/common/locmap.c
@@ -0,0 +1,893 @@
+/*
+ **********************************************************************
+ *   Copyright (C) 1996-2006, International Business Machines
+ *   Corporation and others.  All Rights Reserved.
+ **********************************************************************
+ *
+ * Provides functionality for mapping between
+ * LCID and Posix IDs or ICU locale to codepage
+ *
+ * Note: All classes and code in this file are
+ *       intended for internal use only.
+ *
+ * Methods of interest:
+ *   unsigned long convertToLCID(const char*);
+ *   const char* convertToPosix(unsigned long);
+ *
+ * Kathleen Wilson, 4/30/96
+ *
+ *  Date        Name        Description
+ *  3/11/97     aliu        Fixed off-by-one bug in assignment operator. Added
+ *                          setId() method and safety check against 
+ *                          MAX_ID_LENGTH.
+ * 04/23/99     stephen     Added C wrapper for convertToPosix.
+ * 09/18/00     george      Removed the memory leaks.
+ * 08/23/01     george      Convert to C
+ */
+
+#include "locmap.h"
+#include "cstring.h"
+
+/*
+ * Note:
+ * The mapping from Win32 locale ID numbers to POSIX locale strings should
+ * be the faster one.
+ *
+ * Many LCID values come from winnt.h
+ * Some also come from http://www.microsoft.com/globaldev/reference/lcid-all.mspx
+ */
+
+/*
+////////////////////////////////////////////////
+//
+// Internal Classes for LCID <--> POSIX Mapping
+//
+/////////////////////////////////////////////////
+*/
+
+typedef struct ILcidPosixElement
+{
+    const uint32_t hostID;
+    const char * const posixID;
+} ILcidPosixElement;
+
+typedef struct ILcidPosixMap
+{
+    const uint32_t numRegions;
+    const struct ILcidPosixElement* const regionMaps;
+} ILcidPosixMap;
+
+
+/*
+/////////////////////////////////////////////////
+//
+// Easy macros to make the LCID <--> POSIX Mapping
+//
+/////////////////////////////////////////////////
+*/
+
+/*
+ The standard one language/one country mapping for LCID.
+ The first element must be the language, and the following
+ elements are the language with the country.
+ */
+#define ILCID_POSIX_ELEMENT_ARRAY(hostID, languageID, posixID) \
+static const ILcidPosixElement languageID[] = { \
+    {LANGUAGE_LCID(hostID), #languageID},     /* parent locale */ \
+    {hostID, #posixID}, \
+};
+
+/*
+ Create the map for the posixID. This macro supposes that the language string
+ name is the same as the global variable name, and that the first element
+ in the ILcidPosixElement is just the language.
+ */
+#define ILCID_POSIX_MAP(_posixID) \
+    {sizeof(_posixID)/sizeof(ILcidPosixElement), _posixID}
+
+/*
+////////////////////////////////////////////
+//
+// Create the table of LCID to POSIX Mapping
+// None of it should be dynamically created.
+//
+// Keep static locale variables inside the function so that
+// it can be created properly during static init.
+//
+////////////////////////////////////////////
+*/
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0436, af, af_ZA)
+
+static const ILcidPosixElement ar[] = {
+    {0x01,   "ar"},
+    {0x3801, "ar_AE"},
+    {0x3c01, "ar_BH"},
+    {0x1401, "ar_DZ"},
+    {0x0c01, "ar_EG"},
+    {0x0801, "ar_IQ"},
+    {0x2c01, "ar_JO"},
+    {0x3401, "ar_KW"},
+    {0x3001, "ar_LB"},
+    {0x1001, "ar_LY"},
+    {0x1801, "ar_MA"},
+    {0x2001, "ar_OM"},
+    {0x4001, "ar_QA"},
+    {0x0401, "ar_SA"},
+    {0x2801, "ar_SY"},
+    {0x1c01, "ar_TN"},
+    {0x2401, "ar_YE"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x044d, as, as_IN)
+ILCID_POSIX_ELEMENT_ARRAY(0x045e, am, am_ET)
+ILCID_POSIX_ELEMENT_ARRAY(0x047a, arn,arn_CL)
+
+static const ILcidPosixElement az[] = {
+    {0x2c,   "az"},
+    {0x082c, "az_Cyrl_AZ"},  /* Cyrillic based */
+    {0x082c, "az_Cyrl"},  /* Cyrillic based */
+    {0x042c, "az_Latn_AZ"}, /* Latin based */
+    {0x042c, "az_Latn"}, /* Latin based */
+    {0x042c, "az_AZ"} /* Latin based */
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x046d, ba, ba_RU)
+ILCID_POSIX_ELEMENT_ARRAY(0x0423, be, be_BY)
+
+static const ILcidPosixElement ber[] = {
+    {0x5f,   "ber"},
+    {0x045f, "ber_Arab_DZ"},
+    {0x045f, "ber_Arab"},
+    {0x085f, "ber_Latn_DZ"},
+    {0x085f, "ber_Latn"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0402, bg, bg_BG)
+
+static const ILcidPosixElement bn[] = {
+    {0x45,   "bn"},
+    {0x0845, "bn_BD"},
+    {0x0445, "bn_IN"}
+};
+
+static const ILcidPosixElement bo[] = {
+    {0x51,   "bo"},
+    {0x0851, "bo_BT"},
+    {0x0451, "bo_CN"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x047e, br, br_FR)
+ILCID_POSIX_ELEMENT_ARRAY(0x0403, ca, ca_ES)
+ILCID_POSIX_ELEMENT_ARRAY(0x0483, co, co_FR)
+ILCID_POSIX_ELEMENT_ARRAY(0x045c, chr,chr_US)
+
+/* Declared as cs_CZ to get around compiler errors on z/OS, which defines cs as a function */
+static const ILcidPosixElement cs_CZ[] = {
+    {0x05,   "cs"},
+    {0x0405, "cs_CZ"},
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0452, cy, cy_GB)
+ILCID_POSIX_ELEMENT_ARRAY(0x0406, da, da_DK)
+
+static const ILcidPosixElement de[] = {
+    {0x07,   "de"},
+    {0x0c07, "de_AT"},
+    {0x0807, "de_CH"},
+    {0x0407, "de_DE"},
+    {0x1407, "de_LI"},
+    {0x1007, "de_LU"},
+    {0x10407,"de_DE@collation=phonebook"},  /*This is really de_DE_PHONEBOOK on Windows*/
+    {0x10407,"de@collation=phonebook"}  /*This is really de_DE_PHONEBOOK on Windows*/
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0465, dv, dv_MV)
+ILCID_POSIX_ELEMENT_ARRAY(0x0408, el, el_GR)
+
+static const ILcidPosixElement en[] = {
+    {0x09,   "en"},
+    {0x0c09, "en_AU"},
+    {0x2809, "en_BZ"},
+    {0x1009, "en_CA"},
+    {0x0809, "en_GB"},
+    {0x1809, "en_IE"},
+    {0x4009, "en_IN"},
+    {0x2009, "en_JM"},
+    {0x4409, "en_MY"},
+    {0x1409, "en_NZ"},
+    {0x3409, "en_PH"},
+    {0x4809, "en_SG"},
+    {0x2C09, "en_TT"},
+    {0x0409, "en_US"},
+    {0x007f, "en_US_POSIX"}, /* duplicate for roundtripping */
+    {0x2409, "en_VI"},  /* Virgin Islands AKA Caribbean Islands (en_CB). */
+    {0x1c09, "en_ZA"},
+    {0x3009, "en_ZW"},
+    {0x0409, "en_AS"},  /* Alias for en_US. Leave last. */
+    {0x0409, "en_GU"},  /* Alias for en_US. Leave last. */
+    {0x0409, "en_MH"},  /* Alias for en_US. Leave last. */
+    {0x0409, "en_MP"},  /* Alias for en_US. Leave last. */
+    {0x0409, "en_UM"}   /* Alias for en_US. Leave last. */
+};
+
+static const ILcidPosixElement en_US_POSIX[] = {
+    {0x007f, "en_US_POSIX"} /* duplicate for roundtripping */
+};
+
+static const ILcidPosixElement es[] = {
+    {0x0a,   "es"},
+    {0x2c0a, "es_AR"},
+    {0x400a, "es_BO"},
+    {0x340a, "es_CL"},
+    {0x240a, "es_CO"},
+    {0x140a, "es_CR"},
+    {0x1c0a, "es_DO"},
+    {0x300a, "es_EC"},
+    {0x0c0a, "es_ES"},      /*Modern sort.*/
+    {0x100a, "es_GT"},
+    {0x480a, "es_HN"},
+    {0x080a, "es_MX"},
+    {0x4c0a, "es_NI"},
+    {0x180a, "es_PA"},
+    {0x280a, "es_PE"},
+    {0x500a, "es_PR"},
+    {0x3c0a, "es_PY"},
+    {0x440a, "es_SV"},
+    {0x540a, "es_US"},
+    {0x380a, "es_UY"},
+    {0x200a, "es_VE"},
+    {0x040a, "es_ES@collation=traditional"},
+    {0x040a, "es@collation=traditional"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0425, et, et_EE)
+ILCID_POSIX_ELEMENT_ARRAY(0x042d, eu, eu_ES)
+
+/* ISO-639 doesn't distinguish between Persian and Dari.*/
+static const ILcidPosixElement fa[] = {
+    {0x29,   "fa"},
+    {0x0429, "fa_IR"},  /* Persian/Farsi (Iran) */
+    {0x048c, "fa_AF"}   /* Persian/Dari (Afghanistan) */
+};
+
+/* duplicate for roundtripping */
+static const ILcidPosixElement fa_AF[] = {
+    {0x8c,   "fa_AF"},  /* Persian/Dari (Afghanistan) */
+    {0x048c, "fa_AF"}   /* Persian/Dari (Afghanistan) */
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x040b, fi, fi_FI)
+ILCID_POSIX_ELEMENT_ARRAY(0x0464, fil,fil_PH)
+ILCID_POSIX_ELEMENT_ARRAY(0x0438, fo, fo_FO)
+
+static const ILcidPosixElement fr[] = {
+    {0x0c,   "fr"},
+    {0x080c, "fr_BE"},
+    {0x0c0c, "fr_CA"},
+    {0x240c, "fr_CD"},
+    {0x100c, "fr_CH"},
+    {0x300c, "fr_CI"},
+    {0x2c0c, "fr_CM"},
+    {0x040c, "fr_FR"},
+    {0x3c0c, "fr_HT"},
+    {0x140c, "fr_LU"},
+    {0x380c, "fr_MA"},
+    {0x180c, "fr_MC"},
+    {0x340c, "fr_ML"},
+    {0x200c, "fr_RE"},
+    {0x280c, "fr_SN"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0462, fy, fy_NL)
+
+/* This LCID is really two different locales.*/
+static const ILcidPosixElement ga[] = {
+    {0x3c,   "ga"},
+    {0x3c,   "gd"},
+    {0x083c, "ga_IE"},  /* Gaelic (Ireland) */
+    {0x043c, "gd_GB"}   /* Gaelic (Scotland) */
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0456, gl, gl_ES)
+ILCID_POSIX_ELEMENT_ARRAY(0x0447, gu, gu_IN)
+ILCID_POSIX_ELEMENT_ARRAY(0x0474, gn, gn_PY)
+ILCID_POSIX_ELEMENT_ARRAY(0x0484, gsw,gsw_FR)
+ILCID_POSIX_ELEMENT_ARRAY(0x0468, ha, ha_NG) /* ha_Latn_NG? */
+ILCID_POSIX_ELEMENT_ARRAY(0x0475, haw,haw_US)
+ILCID_POSIX_ELEMENT_ARRAY(0x040d, he, he_IL)
+ILCID_POSIX_ELEMENT_ARRAY(0x0439, hi, hi_IN)
+
+/* This LCID is really four different locales.*/
+static const ILcidPosixElement hr[] = {
+    {0x1a,   "hr"},
+    {0x141a, "bs_Latn_BA"},  /* Bosnian, Bosnia and Herzegovina */
+    {0x141a, "bs_Latn"},  /* Bosnian, Bosnia and Herzegovina */
+    {0x141a, "bs_BA"},  /* Bosnian, Bosnia and Herzegovina */
+    {0x141a, "bs"},     /* Bosnian */
+    {0x201a, "bs_Cyrl_BA"},  /* Bosnian, Bosnia and Herzegovina */
+    {0x201a, "bs_Cyrl"},  /* Bosnian, Bosnia and Herzegovina */
+    {0x101a, "hr_BA"},  /* Croatian in Bosnia */
+    {0x041a, "hr_HR"},  /* Croatian*/
+    {0x181a, "sr_Latn_BA"}, /* Serbo-Croatian in Bosnia */
+    {0x081a, "sr_Latn_CS"}, /* Serbo-Croatian*/
+    {0x081a, "sr_Latn"},    /* It's 0x1a or 0x081a, pick one to make the test program happy. */
+    {0x1c1a, "sr_Cyrl_BA"}, /* Serbo-Croatian in Bosnia */
+    {0x0c1a, "sr_Cyrl_CS"}, /* Serbian*/
+    {0x0c1a, "sr_Cyrl"},    /* It's 0x1a or 0x0c1a, pick one to make the test program happy. */
+    {0x0c1a, "sr"}          /* In CLDR sr is sr_Cyrl. */
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x040e, hu, hu_HU)
+ILCID_POSIX_ELEMENT_ARRAY(0x042b, hy, hy_AM)
+ILCID_POSIX_ELEMENT_ARRAY(0x0421, id, id_ID)
+ILCID_POSIX_ELEMENT_ARRAY(0x0470, ig, ig_NG)
+ILCID_POSIX_ELEMENT_ARRAY(0x0478, ii, ii_CN)
+ILCID_POSIX_ELEMENT_ARRAY(0x040f, is, is_IS)
+
+static const ILcidPosixElement it[] = {
+    {0x10,   "it"},
+    {0x0810, "it_CH"},
+    {0x0410, "it_IT"}
+};
+
+static const ILcidPosixElement iu[] = {
+    {0x5d,   "iu"},
+    {0x045d, "iu_Cans_CA"},
+    {0x045d, "iu_Cans"},
+    {0x085d, "iu_Latn_CA"},
+    {0x085d, "iu_Latn"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x040d, iw, iw_IL)    /*Left in for compatibility*/
+ILCID_POSIX_ELEMENT_ARRAY(0x0411, ja, ja_JP)
+ILCID_POSIX_ELEMENT_ARRAY(0x0437, ka, ka_GE)
+ILCID_POSIX_ELEMENT_ARRAY(0x043f, kk, kk_KZ)
+ILCID_POSIX_ELEMENT_ARRAY(0x046f, kl, kl_GL)
+ILCID_POSIX_ELEMENT_ARRAY(0x0453, km, km_KH)
+ILCID_POSIX_ELEMENT_ARRAY(0x044b, kn, kn_IN)
+
+static const ILcidPosixElement ko[] = {
+    {0x12,   "ko"},
+    {0x0812, "ko_KP"},
+    {0x0412, "ko_KR"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0457, kok, kok_IN)
+ILCID_POSIX_ELEMENT_ARRAY(0x0471, kr,  kr_NG)
+
+static const ILcidPosixElement ks[] = {         /* We could add PK and CN too */
+    {0x60,   "ks"},
+    {0x0860, "ks_IN"},              /* Documentation doesn't mention script */
+    {0x0460, "ks_Arab_IN"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0440, ky, ky_KG)   /* Kyrgyz is spoken in Kyrgyzstan */
+ILCID_POSIX_ELEMENT_ARRAY(0x0476, la, la_IT)   /* TODO: Verify the country */
+ILCID_POSIX_ELEMENT_ARRAY(0x046e, lb, lb_LU)
+ILCID_POSIX_ELEMENT_ARRAY(0x0454, lo, lo_LA)
+ILCID_POSIX_ELEMENT_ARRAY(0x0427, lt, lt_LT)
+ILCID_POSIX_ELEMENT_ARRAY(0x0426, lv, lv_LV)
+ILCID_POSIX_ELEMENT_ARRAY(0x0481, mi, mi_NZ)
+ILCID_POSIX_ELEMENT_ARRAY(0x042f, mk, mk_MK)
+ILCID_POSIX_ELEMENT_ARRAY(0x044c, ml, ml_IN)
+
+static const ILcidPosixElement mn[] = {
+    {0x50,   "mn"},
+    {0x0850, "mn_CN"},
+    {0x0450, "mn_MN"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0458, mni,mni_IN)
+ILCID_POSIX_ELEMENT_ARRAY(0x047c, moh,moh_CA)
+ILCID_POSIX_ELEMENT_ARRAY(0x044e, mr, mr_IN)
+
+static const ILcidPosixElement ms[] = {
+    {0x3e,   "ms"},
+    {0x083e, "ms_BN"},   /* Brunei Darussalam*/
+    {0x043e, "ms_MY"}    /* Malaysia*/
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x043a, mt, mt_MT)
+ILCID_POSIX_ELEMENT_ARRAY(0x0455, my, my_MM)
+
+static const ILcidPosixElement ne[] = {
+    {0x61,   "ne"},
+    {0x0861, "ne_IN"},   /* India*/
+    {0x0461, "ne_NP"}    /* Nepal*/
+};
+
+static const ILcidPosixElement nl[] = {
+    {0x13,   "nl"},
+    {0x0813, "nl_BE"},
+    {0x0413, "nl_NL"}
+};
+
+/* The "no" locale split into nb and nn.  By default in ICU, "no" is nb.*/
+static const ILcidPosixElement no[] = {
+    {0x14,   "nb"},     /* really nb */
+    {0x0414, "nb_NO"},  /* really nb_NO. Keep first in the 414 list. */
+    {0x0414, "no"},     /* really nb_NO */
+    {0x0414, "no_NO"},  /* really nb_NO */
+    {0x0814, "nn_NO"},  /* really nn_NO. Keep first in the 814 list.  */
+    {0x0814, "nn"},     /* It's 0x14 or 0x814, pick one to make the test program happy. */
+    {0x0814, "no_NO_NY"}/* really nn_NO */
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x046c, nso,nso_ZA)   /* TODO: Verify the ISO-639 code */
+ILCID_POSIX_ELEMENT_ARRAY(0x0482, oc, oc_FR)
+ILCID_POSIX_ELEMENT_ARRAY(0x0472, om, om_ET)    /* TODO: Verify the country */
+
+/* Declared as or_IN to get around compiler errors*/
+static const ILcidPosixElement or_IN[] = {
+    {0x48,   "or"},
+    {0x0448, "or_IN"},
+};
+
+static const ILcidPosixElement pa[] = {
+    {0x46,   "pa"},
+    {0x0446, "pa_IN"},
+    {0x0846, "pa_PK"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0415, pl, pl_PL)
+ILCID_POSIX_ELEMENT_ARRAY(0x0463, ps, ps_AF)
+
+static const ILcidPosixElement pt[] = {
+    {0x16,   "pt"},
+    {0x0416, "pt_BR"},
+    {0x0816, "pt_PT"}
+};
+
+static const ILcidPosixElement qu[] = {
+    {0x6b,   "qu"},
+    {0x046b, "qu_BO"},
+    {0x086b, "qu_EC"},
+    {0x0C6b, "qu_PE"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0486, qut, qut_GT) /* qut is an ISO-639-3 code */
+ILCID_POSIX_ELEMENT_ARRAY(0x0417, rm, rm_CH)
+ILCID_POSIX_ELEMENT_ARRAY(0x0418, ro, ro_RO)
+
+static const ILcidPosixElement root[] = {
+    {0x00,   "root"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0419, ru, ru_RU)
+ILCID_POSIX_ELEMENT_ARRAY(0x0487, rw, rw_RW)
+ILCID_POSIX_ELEMENT_ARRAY(0x044f, sa, sa_IN)
+ILCID_POSIX_ELEMENT_ARRAY(0x0485, sah,sah_RU)
+
+static const ILcidPosixElement sd[] = {
+    {0x59,   "sd"},
+    {0x0459, "sd_IN"},
+    {0x0859, "sd_PK"}
+};
+
+static const ILcidPosixElement se[] = {
+    {0x3b,   "se"},
+    {0x0c3b, "se_FI"},
+    {0x043b, "se_NO"},
+    {0x083b, "se_SE"},
+    {0x183b, "sma_NO"},
+    {0x1c3b, "sma_SE"},
+    {0x103b, "smj_NO"},
+    {0x143b, "smj_SE"},
+    {0x243b, "smn_FI"},
+    {0x203b, "sms_FI"},
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x045b, si, si_LK)
+ILCID_POSIX_ELEMENT_ARRAY(0x041b, sk, sk_SK)
+ILCID_POSIX_ELEMENT_ARRAY(0x0424, sl, sl_SI)
+ILCID_POSIX_ELEMENT_ARRAY(0x0477, so, so_ET)    /* TODO: Verify the country */
+ILCID_POSIX_ELEMENT_ARRAY(0x041c, sq, sq_AL)
+
+static const ILcidPosixElement sv[] = {
+    {0x1d,   "sv"},
+    {0x081d, "sv_FI"},
+    {0x041d, "sv_SE"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0441, sw, sw_KE)
+ILCID_POSIX_ELEMENT_ARRAY(0x045A, syr, syr_SY)
+ILCID_POSIX_ELEMENT_ARRAY(0x0449, ta, ta_IN)
+ILCID_POSIX_ELEMENT_ARRAY(0x044a, te, te_IN)
+ILCID_POSIX_ELEMENT_ARRAY(0x0428, tg, tg_TJ) /* Cyrillic based by default */
+ILCID_POSIX_ELEMENT_ARRAY(0x041e, th, th_TH)
+
+static const ILcidPosixElement ti[] = {
+    {0x73,   "ti"},
+    {0x0873, "ti_ER"},
+    {0x0473, "ti_ET"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0442, tk, tk_TM)
+ILCID_POSIX_ELEMENT_ARRAY(0x0432, tn, tn_BW)
+ILCID_POSIX_ELEMENT_ARRAY(0x041f, tr, tr_TR)
+ILCID_POSIX_ELEMENT_ARRAY(0x0444, tt, tt_RU)
+ILCID_POSIX_ELEMENT_ARRAY(0x0480, ug, ug_CN)
+ILCID_POSIX_ELEMENT_ARRAY(0x0422, uk, uk_UA)
+
+static const ILcidPosixElement ur[] = {
+    {0x20,   "ur"},
+    {0x0820, "ur_IN"},
+    {0x0420, "ur_PK"}
+};
+
+static const ILcidPosixElement uz[] = {
+    {0x43,   "uz"},
+    {0x0843, "uz_Cyrl_UZ"},  /* Cyrillic based */
+    {0x0843, "uz_Cyrl"},  /* Cyrillic based */
+    {0x0843, "uz_UZ"},  /* Cyrillic based */
+    {0x0443, "uz_Latn_UZ"}, /* Latin based */
+    {0x0443, "uz_Latn"} /* Latin based */
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0433, ve, ve_ZA)    /* TODO: Verify the country */
+ILCID_POSIX_ELEMENT_ARRAY(0x042a, vi, vi_VN)
+
+static const ILcidPosixElement wen[] = {
+    {0x2E,   "wen"},
+    {0x042E, "wen_DE"},
+    {0x042E, "hsb_DE"},
+    {0x082E, "dsb_DE"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0488, wo, wo_SN)
+ILCID_POSIX_ELEMENT_ARRAY(0x0434, xh, xh_ZA)
+ILCID_POSIX_ELEMENT_ARRAY(0x046a, yo, yo_NG)
+
+static const ILcidPosixElement zh[] = {
+    {0x04,   "zh"},
+    {0x0804, "zh_Hans_CN"},
+    {0x0804, "zh_Hans"},
+    {0x0804, "zh_CN"},
+    {0x0c04, "zh_Hant_HK"},
+    {0x0c04, "zh_HK"},
+    {0x1404, "zh_Hant_MO"},
+    {0x1404, "zh_MO"},
+    {0x1004, "zh_Hans_SG"},
+    {0x1004, "zh_SG"},
+    {0x0404, "zh_Hant_TW"},
+    {0x0404, "zh_Hant"},
+    {0x0404, "zh_TW"},
+    {0x30404,"zh_Hant_TW"},     /* Bopomofo order */
+    {0x30404,"zh_TW"},          /* Bopomofo order */
+    {0x20404,"zh_Hant_TW@collation=stroke"},
+    {0x20404,"zh_TW@collation=stroke"},
+    {0x20804,"zh_Hans_CN@collation=stroke"},
+    {0x20804,"zh_CN@collation=stroke"}
+};
+
+ILCID_POSIX_ELEMENT_ARRAY(0x0435, zu, zu_ZA)
+
+/* This must be static and grouped by LCID. */
+
+/* non-existent ISO-639-2 codes */
+/*
+0x466   Edo
+0x467   Fulfulde - Nigeria
+0x486   K'iche - Guatemala
+0x430   Sutu
+*/
+static const ILcidPosixMap gPosixIDmap[] = {
+    ILCID_POSIX_MAP(af),    /*  af  Afrikaans                 0x36 */
+    ILCID_POSIX_MAP(am),    /*  am  Amharic                   0x5e */
+    ILCID_POSIX_MAP(ar),    /*  ar  Arabic                    0x01 */
+    ILCID_POSIX_MAP(arn),   /*  arn Araucanian/Mapudungun     0x7a */
+    ILCID_POSIX_MAP(as),    /*  as  Assamese                  0x4d */
+    ILCID_POSIX_MAP(az),    /*  az  Azerbaijani               0x2c */
+    ILCID_POSIX_MAP(ba),    /*  ba  Bashkir                   0x6d */
+    ILCID_POSIX_MAP(be),    /*  be  Belarusian                0x23 */
+    ILCID_POSIX_MAP(ber),   /*  ber Berber/Tamazight          0x5f */
+    ILCID_POSIX_MAP(bg),    /*  bg  Bulgarian                 0x02 */
+    ILCID_POSIX_MAP(bn),    /*  bn  Bengali; Bangla           0x45 */
+    ILCID_POSIX_MAP(bo),    /*  bo  Tibetan                   0x51 */
+    ILCID_POSIX_MAP(br),    /*  br  Breton                    0x7e */
+    ILCID_POSIX_MAP(ca),    /*  ca  Catalan                   0x03 */
+    ILCID_POSIX_MAP(chr),   /*  chr Cherokee                  0x5c */
+    ILCID_POSIX_MAP(co),    /*  co  Corsican                  0x83 */
+    ILCID_POSIX_MAP(cs_CZ), /*  cs  Czech                     0x05 */
+    ILCID_POSIX_MAP(cy),    /*  cy  Welsh                     0x52 */
+    ILCID_POSIX_MAP(da),    /*  da  Danish                    0x06 */
+    ILCID_POSIX_MAP(de),    /*  de  German                    0x07 */
+    ILCID_POSIX_MAP(dv),    /*  dv  Divehi                    0x65 */
+    ILCID_POSIX_MAP(el),    /*  el  Greek                     0x08 */
+    ILCID_POSIX_MAP(en),    /*  en  English                   0x09 */
+    ILCID_POSIX_MAP(en_US_POSIX), /*    invariant             0x7f */
+    ILCID_POSIX_MAP(es),    /*  es  Spanish                   0x0a */
+    ILCID_POSIX_MAP(et),    /*  et  Estonian                  0x25 */
+    ILCID_POSIX_MAP(eu),    /*  eu  Basque                    0x2d */
+    ILCID_POSIX_MAP(fa),    /*  fa  Persian/Farsi             0x29 */
+    ILCID_POSIX_MAP(fa_AF), /*  fa  Persian/Dari              0x8c */
+    ILCID_POSIX_MAP(fi),    /*  fi  Finnish                   0x0b */
+    ILCID_POSIX_MAP(fil),   /*  fil Filipino                  0x64 */
+    ILCID_POSIX_MAP(fo),    /*  fo  Faroese                   0x38 */
+    ILCID_POSIX_MAP(fr),    /*  fr  French                    0x0c */
+    ILCID_POSIX_MAP(fy),    /*  fy  Frisian                   0x62 */
+    ILCID_POSIX_MAP(ga),    /*  *   Gaelic (Ireland,Scotland) 0x3c */
+    ILCID_POSIX_MAP(gl),    /*  gl  Galician                  0x56 */
+    ILCID_POSIX_MAP(gn),    /*  gn  Guarani                   0x74 */
+    ILCID_POSIX_MAP(gsw),   /*  gsw Alemanic/Alsatian/Swiss German 0x84 */
+    ILCID_POSIX_MAP(gu),    /*  gu  Gujarati                  0x47 */
+    ILCID_POSIX_MAP(ha),    /*  ha  Hausa                     0x68 */
+    ILCID_POSIX_MAP(haw),   /*  haw Hawaiian                  0x75 */
+    ILCID_POSIX_MAP(he),    /*  he  Hebrew (formerly iw)      0x0d */
+    ILCID_POSIX_MAP(hi),    /*  hi  Hindi                     0x39 */
+    ILCID_POSIX_MAP(hr),    /*  *   Croatian and others       0x1a */
+    ILCID_POSIX_MAP(hu),    /*  hu  Hungarian                 0x0e */
+    ILCID_POSIX_MAP(hy),    /*  hy  Armenian                  0x2b */
+    ILCID_POSIX_MAP(id),    /*  id  Indonesian (formerly in)  0x21 */
+    ILCID_POSIX_MAP(ig),    /*  ig  Igbo                      0x70 */
+    ILCID_POSIX_MAP(ii),    /*  ii  Sichuan Yi                0x78 */
+    ILCID_POSIX_MAP(is),    /*  is  Icelandic                 0x0f */
+    ILCID_POSIX_MAP(it),    /*  it  Italian                   0x10 */
+    ILCID_POSIX_MAP(iu),    /*  iu  Inuktitut                 0x5d */
+    ILCID_POSIX_MAP(iw),    /*  iw  Hebrew                    0x0d */
+    ILCID_POSIX_MAP(ja),    /*  ja  Japanese                  0x11 */
+    ILCID_POSIX_MAP(ka),    /*  ka  Georgian                  0x37 */
+    ILCID_POSIX_MAP(kk),    /*  kk  Kazakh                    0x3f */
+    ILCID_POSIX_MAP(kl),    /*  kl  Kalaallisut               0x6f */
+    ILCID_POSIX_MAP(km),    /*  km  Khmer                     0x53 */
+    ILCID_POSIX_MAP(kn),    /*  kn  Kannada                   0x4b */
+    ILCID_POSIX_MAP(ko),    /*  ko  Korean                    0x12 */
+    ILCID_POSIX_MAP(kok),   /*  kok Konkani                   0x57 */
+    ILCID_POSIX_MAP(kr),    /*  kr  Kanuri                    0x71 */
+    ILCID_POSIX_MAP(ks),    /*  ks  Kashmiri                  0x60 */
+    ILCID_POSIX_MAP(ky),    /*  ky  Kyrgyz                    0x40 */
+    ILCID_POSIX_MAP(lb),    /*  lb  Luxembourgish             0x6e */
+    ILCID_POSIX_MAP(la),    /*  la  Latin                     0x76 */
+    ILCID_POSIX_MAP(lo),    /*  lo  Lao                       0x54 */
+    ILCID_POSIX_MAP(lt),    /*  lt  Lithuanian                0x27 */
+    ILCID_POSIX_MAP(lv),    /*  lv  Latvian, Lettish          0x26 */
+    ILCID_POSIX_MAP(mi),    /*  mi  Maori                     0x81 */
+    ILCID_POSIX_MAP(mk),    /*  mk  Macedonian                0x2f */
+    ILCID_POSIX_MAP(ml),    /*  ml  Malayalam                 0x4c */
+    ILCID_POSIX_MAP(mn),    /*  mn  Mongolian                 0x50 */
+    ILCID_POSIX_MAP(mni),   /*  mni Manipuri                  0x58 */
+    ILCID_POSIX_MAP(moh),   /*  moh Mohawk                    0x7c */
+    ILCID_POSIX_MAP(mr),    /*  mr  Marathi                   0x4e */
+    ILCID_POSIX_MAP(ms),    /*  ms  Malay                     0x3e */
+    ILCID_POSIX_MAP(mt),    /*  mt  Maltese                   0x3a */
+    ILCID_POSIX_MAP(my),    /*  my  Burmese                   0x55 */
+/*    ILCID_POSIX_MAP(nb),    //  no  Norwegian                 0x14 */
+    ILCID_POSIX_MAP(ne),    /*  ne  Nepali                    0x61 */
+    ILCID_POSIX_MAP(nl),    /*  nl  Dutch                     0x13 */
+/*    ILCID_POSIX_MAP(nn),    //  no  Norwegian                 0x14 */
+    ILCID_POSIX_MAP(no),    /*  *   Norwegian                 0x14 */
+    ILCID_POSIX_MAP(nso),   /*  nso Sotho, Northern (Sepedi dialect) 0x6c */
+    ILCID_POSIX_MAP(oc),    /*  oc  Occitan                   0x82 */
+    ILCID_POSIX_MAP(om),    /*  om  Oromo                     0x72 */
+    ILCID_POSIX_MAP(or_IN), /*  or  Oriya                     0x48 */
+    ILCID_POSIX_MAP(pa),    /*  pa  Punjabi                   0x46 */
+    ILCID_POSIX_MAP(pl),    /*  pl  Polish                    0x15 */
+    ILCID_POSIX_MAP(ps),    /*  ps  Pashto                    0x63 */
+    ILCID_POSIX_MAP(pt),    /*  pt  Portuguese                0x16 */
+    ILCID_POSIX_MAP(qu),    /*  qu  Quechua                   0x6B */
+    ILCID_POSIX_MAP(qut),   /*  qut K'iche                    0x86 */
+    ILCID_POSIX_MAP(rm),    /*  rm  Raeto-Romance/Romansh     0x17 */
+    ILCID_POSIX_MAP(ro),    /*  ro  Romanian                  0x18 */
+    ILCID_POSIX_MAP(root),  /*  root                          0x00 */
+    ILCID_POSIX_MAP(ru),    /*  ru  Russian                   0x19 */
+    ILCID_POSIX_MAP(rw),    /*  rw  Kinyarwanda               0x87 */
+    ILCID_POSIX_MAP(sa),    /*  sa  Sanskrit                  0x4f */
+    ILCID_POSIX_MAP(sah),   /*  sah Yakut                     0x85 */
+    ILCID_POSIX_MAP(sd),    /*  sd  Sindhi                    0x59 */
+    ILCID_POSIX_MAP(se),    /*  se  Sami                      0x3b */
+/*    ILCID_POSIX_MAP(sh),    //  sh  Serbo-Croatian            0x1a */
+    ILCID_POSIX_MAP(si),    /*  si  Sinhalese                 0x5b */
+    ILCID_POSIX_MAP(sk),    /*  sk  Slovak                    0x1b */
+    ILCID_POSIX_MAP(sl),    /*  sl  Slovenian                 0x24 */
+    ILCID_POSIX_MAP(so),    /*  so  Somali                    0x77 */
+    ILCID_POSIX_MAP(sq),    /*  sq  Albanian                  0x1c */
+/*    ILCID_POSIX_MAP(sr),    //  sr  Serbian                   0x1a */
+    ILCID_POSIX_MAP(sv),    /*  sv  Swedish                   0x1d */
+    ILCID_POSIX_MAP(sw),    /*  sw  Swahili                   0x41 */
+    ILCID_POSIX_MAP(syr),   /*  syr Syriac                    0x5A */
+    ILCID_POSIX_MAP(ta),    /*  ta  Tamil                     0x49 */
+    ILCID_POSIX_MAP(te),    /*  te  Telugu                    0x4a */
+    ILCID_POSIX_MAP(tg),    /*  tg  Tajik                     0x28 */
+    ILCID_POSIX_MAP(th),    /*  th  Thai                      0x1e */
+    ILCID_POSIX_MAP(ti),    /*  ti  Tigrigna                  0x73 */
+    ILCID_POSIX_MAP(tk),    /*  tk  Turkmen                   0x42 */
+    ILCID_POSIX_MAP(tn),    /*  tn  Tswana                    0x32 */
+    ILCID_POSIX_MAP(tr),    /*  tr  Turkish                   0x1f */
+    ILCID_POSIX_MAP(tt),    /*  tt  Tatar                     0x44 */
+    ILCID_POSIX_MAP(ug),    /*  ug  Uighur                    0x80 */
+    ILCID_POSIX_MAP(uk),    /*  uk  Ukrainian                 0x22 */
+    ILCID_POSIX_MAP(ur),    /*  ur  Urdu                      0x20 */
+    ILCID_POSIX_MAP(uz),    /*  uz  Uzbek                     0x43 */
+    ILCID_POSIX_MAP(ve),    /*  ve  Venda                     0x33 */
+    ILCID_POSIX_MAP(vi),    /*  vi  Vietnamese                0x2a */
+    ILCID_POSIX_MAP(wen),   /*  wen Sorbian                   0x2e */
+    ILCID_POSIX_MAP(wo),    /*  wo  Wolof                     0x88 */
+    ILCID_POSIX_MAP(xh),    /*  xh  Xhosa                     0x34 */
+    ILCID_POSIX_MAP(yo),    /*  yo  Yoruba                    0x6a */
+    ILCID_POSIX_MAP(zh),    /*  zh  Chinese                   0x04 */
+    ILCID_POSIX_MAP(zu),    /*  zu  Zulu                      0x35 */
+};
+
+static const uint32_t gLocaleCount = sizeof(gPosixIDmap)/sizeof(ILcidPosixMap);
+
+/**
+ * Do not call this function. It is called by hostID.
+ * The function is not private because this struct must stay as a C struct,
+ * and this is an internal class.
+ */
+static int32_t
+idCmp(const char* id1, const char* id2)
+{
+    int32_t diffIdx = 0;
+    while (*id1 == *id2 && *id1 != 0) {
+        diffIdx++;
+        id1++;
+        id2++;
+    }
+    return diffIdx;
+}
+
+/**
+ * Searches for a Windows LCID
+ *
+ * @param posixid the Posix style locale id.
+ * @param status gets set to U_ILLEGAL_ARGUMENT_ERROR when the Posix ID has
+ *               no equivalent Windows LCID.
+ * @return the LCID
+ */
+static uint32_t
+getHostID(const ILcidPosixMap *this_0, const char* posixID, UErrorCode* status)
+{
+    int32_t bestIdx = 0;
+    int32_t bestIdxDiff = 0;
+    int32_t posixIDlen = (int32_t)uprv_strlen(posixID);
+    uint32_t idx;
+
+    for (idx = 0; idx < this_0->numRegions; idx++ ) {
+        int32_t sameChars = idCmp(posixID, this_0->regionMaps[idx].posixID);
+        if (sameChars > bestIdxDiff && this_0->regionMaps[idx].posixID[sameChars] == 0) {
+            if (posixIDlen == sameChars) {
+                /* Exact match */
+                return this_0->regionMaps[idx].hostID;
+            }
+            bestIdxDiff = sameChars;
+            bestIdx = idx;
+        }
+    }
+    /* We asked for something unusual, like en_ZZ, and we try to return the number for the same language. */
+    /* We also have to make sure that sid and si and similar string subsets don't match. */
+    if ((posixID[bestIdxDiff] == '_' || posixID[bestIdxDiff] == '@')
+        && this_0->regionMaps[bestIdx].posixID[bestIdxDiff] == 0)
+    {
+        *status = U_USING_FALLBACK_WARNING;
+        return this_0->regionMaps[bestIdx].hostID;
+    }
+
+    /*no match found */
+    *status = U_ILLEGAL_ARGUMENT_ERROR;
+    return this_0->regionMaps->hostID;
+}
+
+static const char*
+getPosixID(const ILcidPosixMap *this_0, uint32_t hostID)
+{
+    uint32_t i;
+    for (i = 0; i <= this_0->numRegions; i++)
+    {
+        if (this_0->regionMaps[i].hostID == hostID)
+        {
+            return this_0->regionMaps[i].posixID;
+        }
+    }
+
+    /* If you get here, then no matching region was found,
+       so return the language id with the wild card region. */
+    return this_0->regionMaps[0].posixID;
+}
+
+/*
+//////////////////////////////////////
+//
+// LCID --> POSIX
+//
+/////////////////////////////////////
+*/
+
+U_CAPI const char *
+uprv_convertToPosix(uint32_t hostid, UErrorCode* status)
+{
+    uint16_t langID = LANGUAGE_LCID(hostid);
+    uint32_t index;
+
+    for (index = 0; index < gLocaleCount; index++)
+    {
+        if (langID == gPosixIDmap[index].regionMaps->hostID)
+        {
+            return getPosixID(&gPosixIDmap[index], hostid);
+        }
+    }
+
+    /* no match found */
+    *status = U_ILLEGAL_ARGUMENT_ERROR;
+    return NULL;
+}
+
+/*
+//////////////////////////////////////
+//
+// POSIX --> LCID
+// This should only be called from uloc_getLCID.
+// The locale ID must be in canonical form.
+// langID is separate so that this file doesn't depend on the uloc_* API.
+//
+/////////////////////////////////////
+*/
+
+U_CAPI uint32_t
+uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status)
+{
+
+    uint32_t   low    = 0;
+    uint32_t   high   = gLocaleCount;
+    uint32_t   mid    = high;
+    uint32_t   oldmid = 0;
+    int32_t    compVal;
+
+    uint32_t   value         = 0;
+    uint32_t   fallbackValue = (uint32_t)-1;
+    UErrorCode myStatus;
+    uint32_t   idx;
+
+    /* Check for incomplete id. */
+    if (!langID || !posixID || uprv_strlen(langID) < 2 || uprv_strlen(posixID) < 2) {
+        return 0;
+    }
+
+    /*Binary search for the map entry for normal cases */
+
+    while (high > low)  /*binary search*/{
+
+        mid = (high+low) >> 1; /*Finds median*/
+
+        if (mid == oldmid) 
+            break;
+
+        compVal = uprv_strcmp(langID, gPosixIDmap[mid].regionMaps->posixID);
+        if (compVal < 0){
+            high = mid;
+        }
+        else if (compVal > 0){
+            low = mid;
+        }
+        else /*we found it*/{
+            return getHostID(&gPosixIDmap[mid], posixID, status);
+        }
+        oldmid = mid;
+    }
+
+    /*
+     * Sometimes we can't do a binary search on posixID because some LCIDs
+     * go to different locales.  We hit one of those special cases.
+     */
+    for (idx = 0; idx < gLocaleCount; idx++ ) {
+        myStatus = U_ZERO_ERROR;
+        value = getHostID(&gPosixIDmap[idx], posixID, &myStatus);
+        if (myStatus == U_ZERO_ERROR) {
+            return value;
+        }
+        else if (myStatus == U_USING_FALLBACK_WARNING) {
+            fallbackValue = value;
+        }
+    }
+
+    if (fallbackValue != (uint32_t)-1) {
+        *status = U_USING_FALLBACK_WARNING;
+        return fallbackValue;
+    }
+
+    /* no match found */
+    *status = U_ILLEGAL_ARGUMENT_ERROR;
+    return 0;   /* return international (root) */
+}
+
diff --git a/source/common/locmap.h b/source/common/locmap.h
new file mode 100644
index 0000000..7db0607
--- /dev/null
+++ b/source/common/locmap.h
@@ -0,0 +1,37 @@
+/*
+******************************************************************************
+*
+*   Copyright (C) 1996-2004, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*
+* File locmap.h      : Locale Mapping Classes
+* 
+*
+* Created by: Helena Shih
+*
+* Modification History:
+*
+*  Date        Name        Description
+*  3/11/97     aliu        Added setId().
+*  4/20/99     Madhu       Added T_convertToPosix()
+* 09/18/00     george      Removed the memory leaks.
+* 08/23/01     george      Convert to C
+*============================================================================
+*/
+
+#ifndef LOCMAP_H
+#define LOCMAP_H
+
+#include "unicode/utypes.h"
+
+#define LANGUAGE_LCID(hostID) (uint16_t)(0x03FF & hostID)
+
+U_CAPI const char *uprv_convertToPosix(uint32_t hostid, UErrorCode* status);
+
+/* Don't call this function directly. Use uloc_getLCID instead. */
+U_CAPI uint32_t uprv_convertToLCID(const char *langID, const char* posixID, UErrorCode* status);
+
+#endif /* LOCMAP_H */
+
diff --git a/source/common/locutil.cpp b/source/common/locutil.cpp
new file mode 100644
index 0000000..e70b616
--- /dev/null
+++ b/source/common/locutil.cpp
@@ -0,0 +1,267 @@
+/**
+ *******************************************************************************
+ * Copyright (C) 2002-2006, International Business Machines Corporation and    *
+ * others. All Rights Reserved.                                                *
+ *******************************************************************************
+ *
+ *******************************************************************************
+ */
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_SERVICE || !UCONFIG_NO_TRANSLITERATION
+
+#include "unicode/resbund.h"
+#include "cmemory.h"
+#include "ustrfmt.h"
+#include "locutil.h"
+#include "charstr.h"
+#include "ucln_cmn.h"
+#include "uassert.h"
+#include "umutex.h"
+
+// see LocaleUtility::getAvailableLocaleNames
+static U_NAMESPACE_QUALIFIER Hashtable * LocaleUtility_cache = NULL;
+
+#define UNDERSCORE_CHAR ((UChar)0x005f)
+#define AT_SIGN_CHAR    ((UChar)64)
+#define PERIOD_CHAR     ((UChar)46)
+
+/*
+ ******************************************************************
+ */
+
+/**
+ * Release all static memory held by Locale Utility.  
+ */
+U_CDECL_BEGIN
+static UBool U_CALLCONV service_cleanup(void) {
+    if (LocaleUtility_cache) {
+        delete LocaleUtility_cache;
+        LocaleUtility_cache = NULL;
+    }
+    return TRUE;
+}
+U_CDECL_END
+
+U_NAMESPACE_BEGIN
+
+UnicodeString&
+LocaleUtility::canonicalLocaleString(const UnicodeString* id, UnicodeString& result)
+{
+  if (id == NULL) {
+    result.setToBogus();
+  } else {
+    // Fix case only (no other changes) up to the first '@' or '.' or
+    // end of string, whichever comes first.  In 3.0 I changed this to
+    // stop at first '@' or '.'.  It used to run out to the end of
+    // string.  My fix makes the tests pass but is probably
+    // structurally incorrect.  See below.  [alan 3.0]
+
+    // TODO: Doug, you might want to revise this...
+    result = *id;
+    int32_t i = 0;
+    int32_t end = result.indexOf(AT_SIGN_CHAR);
+    int32_t n = result.indexOf(PERIOD_CHAR);
+    if (n >= 0 && n < end) {
+        end = n;
+    }
+    if (end < 0) {
+        end = result.length();
+    }
+    n = result.indexOf(UNDERSCORE_CHAR);
+    if (n < 0) {
+      n = end;
+    }
+    for (; i < n; ++i) {
+      UChar c = result.charAt(i);
+      if (c >= 0x0041 && c <= 0x005a) {
+        c += 0x20;
+        result.setCharAt(i, c);
+      }
+    }
+    for (n = end; i < n; ++i) {
+      UChar c = result.charAt(i);
+      if (c >= 0x0061 && c <= 0x007a) {
+        c -= 0x20;
+        result.setCharAt(i, c);
+      }
+    }
+  }
+  return result;
+
+#if 0
+    // This code does a proper full level 2 canonicalization of id.
+    // It's nasty to go from UChar to char to char to UChar -- but
+    // that's what you have to do to use the uloc_canonicalize
+    // function on UnicodeStrings.
+
+    // I ended up doing the alternate fix (see above) not for
+    // performance reasons, although performance will certainly be
+    // better, but because doing a full level 2 canonicalization
+    // causes some tests to fail.  [alan 3.0]
+
+    // TODO: Doug, you might want to revisit this...
+    result.setToBogus();
+    if (id != 0) {
+        int32_t buflen = id->length() + 8; // space for NUL
+        char* buf = (char*) uprv_malloc(buflen);
+        char* canon = (buf == 0) ? 0 : (char*) uprv_malloc(buflen);
+        if (buf != 0 && canon != 0) {
+            U_ASSERT(id->extract(0, INT32_MAX, buf, buflen) < buflen);
+            UErrorCode ec = U_ZERO_ERROR;
+            uloc_canonicalize(buf, canon, buflen, &ec);
+            if (U_SUCCESS(ec)) {
+                result = UnicodeString(canon);
+            }
+        }
+        uprv_free(buf);
+        uprv_free(canon);
+    }
+    return result;
+#endif
+}
+
+Locale&
+LocaleUtility::initLocaleFromName(const UnicodeString& id, Locale& result)
+{
+    enum { BUFLEN = 128 }; // larger than ever needed
+
+    if (id.isBogus() || id.length() >= BUFLEN) {
+        result.setToBogus();
+    } else {
+        /*
+         * We need to convert from a UnicodeString to char * in order to
+         * create a Locale.
+         *
+         * Problem: Locale ID strings may contain '@' which is a variant
+         * character and cannot be handled by invariant-character conversion.
+         *
+         * Hack: Since ICU code can handle locale IDs with multiple encodings
+         * of '@' (at least for EBCDIC; it's not known to be a problem for
+         * ASCII-based systems),
+         * we use regular invariant-character conversion for everything else
+         * and manually convert U+0040 into a compiler-char-constant '@'.
+         * While this compilation-time constant may not match the runtime
+         * encoding of '@', it should be one of the encodings which ICU
+         * recognizes.
+         *
+         * There should be only at most one '@' in a locale ID.
+         */
+        char buffer[BUFLEN];
+        int32_t prev, i;
+        prev = 0;
+        for(;;) {
+            i = id.indexOf((UChar)0x40, prev);
+            if(i < 0) {
+                // no @ between prev and the rest of the string
+                id.extract(prev, INT32_MAX, buffer + prev, BUFLEN - prev, US_INV);
+                break; // done
+            } else {
+                // normal invariant-character conversion for text between @s
+                id.extract(prev, i - prev, buffer + prev, BUFLEN - prev, US_INV);
+                // manually "convert" U+0040 at id[i] into '@' at buffer[i]
+                buffer[i] = '@';
+                prev = i + 1;
+            }
+        }
+        result = Locale::createFromName(buffer);
+    }
+    return result;
+}
+
+UnicodeString&
+LocaleUtility::initNameFromLocale(const Locale& locale, UnicodeString& result)
+{
+    if (locale.isBogus()) {
+        result.setToBogus();
+    } else {
+        result.append(UnicodeString(locale.getName(), -1, US_INV));
+    }
+    return result;
+}
+
+const Hashtable*
+LocaleUtility::getAvailableLocaleNames(const UnicodeString& bundleID)
+{
+    // LocaleUtility_cache is a hash-of-hashes.  The top-level keys
+    // are path strings ('bundleID') passed to
+    // ures_openAvailableLocales.  The top-level values are
+    // second-level hashes.  The second-level keys are result strings
+    // from ures_openAvailableLocales.  The second-level values are
+    // garbage ((void*)1 or other random pointer).
+
+    UErrorCode status = U_ZERO_ERROR;
+    Hashtable* cache;
+    umtx_lock(NULL);
+    cache = LocaleUtility_cache;
+    umtx_unlock(NULL);
+
+    if (cache == NULL) {
+        cache = new Hashtable(status);
+        if (cache == NULL || U_FAILURE(status)) {
+            return NULL; // catastrophic failure; e.g. out of memory
+        }
+        cache->setValueDeleter(uhash_deleteHashtable);
+        Hashtable* h; // set this to final LocaleUtility_cache value
+        umtx_lock(NULL);
+        h = LocaleUtility_cache;
+        if (h == NULL) {
+            LocaleUtility_cache = h = cache;
+            cache = NULL;
+            ucln_common_registerCleanup(UCLN_COMMON_SERVICE, service_cleanup);
+        }
+        umtx_unlock(NULL);
+        if(cache != NULL) {
+          delete cache;
+        }
+        cache = h;
+    }
+
+    U_ASSERT(cache != NULL);
+
+    Hashtable* htp;
+    umtx_lock(NULL);
+    htp = (Hashtable*) cache->get(bundleID);
+    umtx_unlock(NULL);
+
+    if (htp == NULL) {
+        htp = new Hashtable(status);
+        if (htp && U_SUCCESS(status)) {
+            CharString cbundleID(bundleID);
+            const char* path = (const char*) cbundleID;
+            if (*path == 0) path = NULL; // empty string => NULL
+            UEnumeration *uenum = ures_openAvailableLocales(path, &status);
+            for (;;) {
+                const UChar* id = uenum_unext(uenum, NULL, &status);
+                if (id == NULL) {
+                    break;
+                }
+                htp->put(UnicodeString(id), (void*)htp, status);
+            }
+            uenum_close(uenum);
+            if (U_FAILURE(status)) {
+                delete htp;
+                return NULL;
+            }
+            umtx_lock(NULL);
+            cache->put(bundleID, (void*)htp, status);
+            umtx_unlock(NULL);
+        }
+    }
+    return htp;
+}
+
+UBool
+LocaleUtility::isFallbackOf(const UnicodeString& root, const UnicodeString& child)
+{
+    return child.indexOf(root) == 0 &&
+      (child.length() == root.length() ||
+       child.charAt(root.length()) == UNDERSCORE_CHAR);
+}
+
+U_NAMESPACE_END
+
+/* !UCONFIG_NO_SERVICE */
+#endif
+
+
diff --git a/source/common/locutil.h b/source/common/locutil.h
new file mode 100644
index 0000000..cf64e34
--- /dev/null
+++ b/source/common/locutil.h
@@ -0,0 +1,37 @@
+/**
+ *******************************************************************************
+ * Copyright (C) 2002-2005, International Business Machines Corporation and    *
+ * others. All Rights Reserved.                                                *
+ *******************************************************************************
+ *
+ *******************************************************************************
+ */
+#ifndef LOCUTIL_H
+#define LOCUTIL_H
+
+#include "unicode/utypes.h"
+#include "hash.h"
+
+#if !UCONFIG_NO_SERVICE || !UCONFIG_NO_TRANSLITERATION
+
+
+U_NAMESPACE_BEGIN
+
+// temporary utility functions, till I know where to find them
+// in header so tests can also access them
+
+class U_COMMON_API LocaleUtility {
+public:
+  static UnicodeString& canonicalLocaleString(const UnicodeString* id, UnicodeString& result);
+  static Locale& initLocaleFromName(const UnicodeString& id, Locale& result);
+  static UnicodeString& initNameFromLocale(const Locale& locale, UnicodeString& result);
+  static const Hashtable* getAvailableLocaleNames(const UnicodeString& bundleID);
+  static UBool isFallbackOf(const UnicodeString& root, const UnicodeString& child);
+};
+
+U_NAMESPACE_END
+
+
+#endif
+
+#endif
diff --git a/source/common/msvcres.h b/source/common/msvcres.h
new file mode 100644
index 0000000..cad2fe6
--- /dev/null
+++ b/source/common/msvcres.h
@@ -0,0 +1,20 @@
+//{{NO_DEPENDENCIES}}
+// Copyright (c) 2003-2005 International Business Machines
+// Corporation and others. All Rights Reserved.
+//
+// Used by common.rc and other .rc files.
+//Do not edit with Microsoft Developer Studio because it will modify this
+//header the wrong way. This is here to prevent Visual Studio .NET from
+//unnessarily building the resource files when it's not needed.
+//
+
+/*
+These are defined before unicode/uversion.h in order to prevent 
+STLPort's broken stddef.h from being used when rc.exe parses this file. 
+*/
+#define _STLP_OUTERMOST_HEADER_ID 0
+#define _STLP_WINCE 1
+
+#include "unicode/uversion.h"
+
+#define ICU_WEBSITE "http://ibm.com/software/globalization/icu/"
diff --git a/source/common/mutex.h b/source/common/mutex.h
new file mode 100644
index 0000000..26aefbf
--- /dev/null
+++ b/source/common/mutex.h
@@ -0,0 +1,85 @@
+/*
+******************************************************************************
+*
+*   Copyright (C) 1997-2003, International Business Machines
+*   Corporation and others.  All Rights Reserved.
+*
+******************************************************************************
+*/
+//----------------------------------------------------------------------------
+// File:     mutex.h
+//
+// Lightweight C++ wrapper for umtx_ C mutex functions
+//
+// Author:   Alan Liu  1/31/97
+// History:
+// 06/04/97   helena         Updated setImplementation as per feedback from 5/21 drop.
+// 04/07/1999  srl               refocused as a thin wrapper
+//
+//----------------------------------------------------------------------------
+#ifndef MUTEX_H
+#define MUTEX_H
+
+#include "unicode/utypes.h"
+#include "unicode/uobject.h"
+#include "umutex.h"
+
+U_NAMESPACE_BEGIN
+
+//----------------------------------------------------------------------------
+// Code within that accesses shared static or global data should
+// should instantiate a Mutex object while doing so. You should make your own 
+// private mutex where possible.
+
+// For example:
+// 
+// UMTX myMutex;
+// 
+// int InitializeMyMutex()
+// {
+//    umtx_init( &myMutex );
+//    return 0;
+// }
+// 
+// static int initializeMyMutex = InitializeMyMutex();
+//
+// void Function(int arg1, int arg2)
+// {
+//    static Object* foo;     // Shared read-write object
+//    Mutex mutex(&myMutex);  // or no args for the global lock
+//    foo->Method();
+//    // When 'mutex' goes out of scope and gets destroyed here, the lock is released
+// }
+//
+// Note:  Do NOT use the form 'Mutex mutex();' as that merely forward-declares a function
+//        returning a Mutex. This is a common mistake which silently slips through the
+//        compiler!!
+//
+
+class U_COMMON_API Mutex : public UMemory {
+public:
+  inline Mutex(UMTX *mutex = NULL);
+  inline ~Mutex();
+
+private:
+  UMTX   *fMutex;
+
+  Mutex(const Mutex &other); // forbid copying of this class
+  Mutex &operator=(const Mutex &other); // forbid copying of this class
+};
+
+inline Mutex::Mutex(UMTX *mutex)
+  : fMutex(mutex)
+{
+  umtx_lock(fMutex);
+}
+
+inline Mutex::~Mutex()
+{
+  umtx_unlock(fMutex);
+}
+
+U_NAMESPACE_END
+
+#endif //_MUTEX_
+//eof
diff --git a/source/common/normlzr.cpp b/source/common/normlzr.cpp
new file mode 100644
index 0000000..909bd30
--- /dev/null
+++ b/source/common/normlzr.cpp
@@ -0,0 +1,611 @@
+/*
+ *************************************************************************
+ * COPYRIGHT: 
+ * Copyright (c) 1996-2005, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ *************************************************************************
+ */
+
+#include "unicode/utypes.h"
+
+#if !UCONFIG_NO_NORMALIZATION
+
+#include "unicode/unistr.h"
+#include "unicode/chariter.h"
+#include "unicode/schriter.h"
+#include "unicode/uchriter.h"
+#include "unicode/uiter.h"
+#include "unicode/normlzr.h"
+#include "cmemory.h"
+#include "unormimp.h"
+
+U_NAMESPACE_BEGIN
+
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Normalizer)
+
+//-------------------------------------------------------------------------
+// Constructors and other boilerplate
+//-------------------------------------------------------------------------
+
+Normalizer::Normalizer(const UnicodeString& str, UNormalizationMode mode) :
+    UObject(), fUMode(mode), fOptions(0),
+    currentIndex(0), nextIndex(0),
+    buffer(), bufferPos(0)
+{
+    init(new StringCharacterIterator(str));
+}
+
+Normalizer::Normalizer(const UChar *str, int32_t length, UNormalizationMode mode) :
+    UObject(), fUMode(mode), fOptions(0),
+    currentIndex(0), nextIndex(0),
+    buffer(), bufferPos(0)
+{
+    init(new UCharCharacterIterator(str, length));
+}
+
+Normalizer::Normalizer(const CharacterIterator& iter, UNormalizationMode mode) :
+    UObject(), fUMode(mode), fOptions(0),
+    currentIndex(0), nextIndex(0),
+    buffer(), bufferPos(0)
+{
+    init(iter.clone());
+}
+
+Normalizer::Normalizer(const Normalizer &copy) :
+    UObject(copy), fUMode(copy.fUMode), fOptions(copy.fOptions),
+    currentIndex(copy.currentIndex), nextIndex(copy.nextIndex),
+    buffer(copy.buffer), bufferPos(copy.bufferPos)
+{
+    init(((CharacterIterator *)(copy.text->context))->clone());
+}
+
+static const UChar _NUL=0;
+
+void
+Normalizer::init(CharacterIterator *iter) {
+    UErrorCode errorCode=U_ZERO_ERROR;
+
+    text=(UCharIterator *)uprv_malloc(sizeof(UCharIterator));
+    if(text!=NULL) {
+        if(unorm_haveData(&errorCode)) {
+            uiter_setCharacterIterator(text, iter);
+        } else {
+            delete iter;
+            uiter_setCharacterIterator(text, new UCharCharacterIterator(&_NUL, 0));
+        }
+    } else {
+        delete iter;
+    }
+}
+
+Normalizer::~Normalizer()
+{
+    if(text!=NULL) {
+        delete (CharacterIterator *)text->context;
+        uprv_free(text);
+    }
+}
+
+Normalizer* 
+Normalizer::clone() const
+{
+    if(this!=0) {
+        return new Normalizer(*this);
+    } else {
+        return 0;
+    }
+}
+
+/**
+ * Generates a hash code for this iterator.
+ */
+int32_t Normalizer::hashCode() const
+{
+    return ((CharacterIterator *)(text->context))->hashCode() + fUMode + fOptions + buffer.hashCode() + bufferPos + currentIndex + nextIndex;
+}
+    
+UBool Normalizer::operator==(const Normalizer& that) const
+{
+    return
+        this==&that ||
+        fUMode==that.fUMode &&
+        fOptions==that.fOptions &&
+        *((CharacterIterator *)(text->context))==*((CharacterIterator *)(that.text->context)) &&
+        buffer==that.buffer &&
+        bufferPos==that.bufferPos &&
+        nextIndex==that.nextIndex;
+}
+
+//-------------------------------------------------------------------------
+// Static utility methods
+//-------------------------------------------------------------------------
+
+void U_EXPORT2
+Normalizer::normalize(const UnicodeString& source, 
+                      UNormalizationMode mode, int32_t options,
+                      UnicodeString& result, 
+                      UErrorCode &status) {
+    if(source.isBogus() || U_FAILURE(status)) {
+        result.setToBogus();
+        if(U_SUCCESS(status)) {
+            status=U_ILLEGAL_ARGUMENT_ERROR;
+        }
+    } else {
+        UnicodeString localDest;
+        UnicodeString *dest;
+
+        if(&source!=&result) {
+            dest=&result;
+        } else {
+            // the source and result strings are the same object, use a temporary one
+            dest=&localDest;
+        }
+
+        UChar *buffer=dest->getBuffer(source.length());
+        int32_t length=unorm_internalNormalize(buffer, dest->getCapacity(),
+                                               source.getBuffer(), source.length(),
+                                               mode, options,
+                                               &status);
+        dest->releaseBuffer(U_SUCCESS(status) ? length : 0);
+        if(status==U_BUFFER_OVERFLOW_ERROR) {
+            status=U_ZERO_ERROR;
+            buffer=dest->getBuffer(length);
+            length=unorm_internalNormalize(buffer, dest->getCapacity(),
+                                           source.getBuffer(), source.length(),
+                                           mode, options,
+                                           &status);
+            dest->releaseBuffer(U_SUCCESS(status) ? length : 0);
+        }
+
+        if(dest==&localDest) {
+            result=*dest;
+        }
+        if(U_FAILURE(status)) {
+            result.setToBogus();
+        }
+    }
+}
+
+void U_EXPORT2
+Normalizer::compose(const UnicodeString& source, 
+                    UBool compat, int32_t options,
+                    UnicodeString& result, 
+                    UErrorCode &status) {
+    if(source.isBogus() || U_FAILURE(status)) {
+        result.setToBogus();
+        if(U_SUCCESS(status)) {
+            status=U_ILLEGAL_ARGUMENT_ERROR;
+        }
+    } else {
+        UnicodeString localDest;
+        UnicodeString *dest;
+
+        if(&source!=&result) {
+            dest=&result;
+        } else {
+            // the source and result strings are the same object, use a temporary one
+            dest=&localDest;
+        }
+
+        UChar *buffer=dest->getBuffer(source.length());
+        int32_t length=unorm_compose(buffer, dest->getCapacity(),
+                                     source.getBuffer(), source.length(),
+                                     compat, options,
+                                     &status);
+        dest->releaseBuffer(U_SUCCESS(status) ? length : 0);
+        if(status==U_BUFFER_OVERFLOW_ERROR) {
+            status=U_ZERO_ERROR;
+            buffer=dest->getBuffer(length);
+            length=unorm_compose(buffer, dest->getCapacity(),
+                                 source.getBuffer(), source.length(),
+                                 compat, options,
+                                 &status);
+            dest->releaseBuffer(U_SUCCESS(status) ? length : 0);
+        }
+
+        if(dest==&localDest) {
+            result=*dest;
+        }
+        if(U_FAILURE(status)) {
+            result.setToBogus();
+        }
+    }
+}
+
+void U_EXPORT2
+Normalizer::decompose(const UnicodeString& source, 
+                      UBool compat, int32_t options,
+                      UnicodeString& result, 
+                      UErrorCode &status) {
+    if(source.isBogus() || U_FAILURE(status)) {
+        result.setToBogus();
+        if(U_SUCCESS(status)) {
+            status=U_ILLEGAL_ARGUMENT_ERROR;
+        }
+    } else {
+        UnicodeString localDest;
+        UnicodeString *dest;
+
+        if(&source!=&result) {
+            dest=&result;
+        } else {
+            // the source and result strings are the same object, use a temporary one
+            dest=&localDest;
+        }
+
+        UChar *buffer=dest->getBuffer(source.length());
+        int32_t length=unorm_decompose(buffer, dest->getCapacity(),
+                                     source.getBuffer(), source.length(),
+                                     compat, options,
+                                     &status);
+        dest->releaseBuffer(U_SUCCESS(status) ? length : 0);
+        if(status==U_BUFFER_OVERFLOW_ERROR) {