changeset 91:11e8159caf7a

make the mango icu fork work.
author Frank Benoit <benoit@tionex.de>
date Mon, 07 Jul 2008 15:53:07 +0200
parents 7ffeace6c47f
children f05207c07a98
files dwtx/dwtxhelper/mangoicu/ICU.d dwtx/dwtxhelper/mangoicu/UBreakIterator.d dwtx/dwtxhelper/mangoicu/UCalendar.d dwtx/dwtxhelper/mangoicu/UChar.d dwtx/dwtxhelper/mangoicu/UCollator.d dwtx/dwtxhelper/mangoicu/UConverter.d dwtx/dwtxhelper/mangoicu/UDateFormat.d dwtx/dwtxhelper/mangoicu/UDomainName.d dwtx/dwtxhelper/mangoicu/UEnumeration.d dwtx/dwtxhelper/mangoicu/ULocale.d dwtx/dwtxhelper/mangoicu/UMessageFormat.d dwtx/dwtxhelper/mangoicu/UNormalize.d dwtx/dwtxhelper/mangoicu/UNumberFormat.d dwtx/dwtxhelper/mangoicu/URegex.d dwtx/dwtxhelper/mangoicu/UResourceBundle.d dwtx/dwtxhelper/mangoicu/USearch.d dwtx/dwtxhelper/mangoicu/USet.d dwtx/dwtxhelper/mangoicu/UString.d dwtx/dwtxhelper/mangoicu/UStringPrep.d dwtx/dwtxhelper/mangoicu/UText.d dwtx/dwtxhelper/mangoicu/UTimeZone.d dwtx/dwtxhelper/mangoicu/UTransform.d dwtx/ui/internal/forms/widgets/FormUtil.d dwtx/ui/internal/forms/widgets/TextSegment.d
diffstat 24 files changed, 1362 insertions(+), 1071 deletions(-) [+]
line wrap: on
line diff
--- a/dwtx/dwtxhelper/mangoicu/ICU.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/ICU.d	Mon Jul 07 15:53:07 2008 +0200
@@ -40,7 +40,7 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.ICU;
+module dwtx.dwtxhelper.mangoicu.ICU;
 
 /*******************************************************************************
 
@@ -98,20 +98,20 @@
 
         version (Win32)
                 {
-                protected static char[] icuuc = "icuuc"~ICULib~".dll";
-                protected static char[] icuin = "icuin"~ICULib~".dll";
+                package static char[] icuuc = "icuuc"~ICULib~".dll";
+                package static char[] icuin = "icuin"~ICULib~".dll";
                 }
         else
         version (linux)
                 {
-                protected static char[] icuuc = "libicuuc.so."~ICULib;
-                protected static char[] icuin = "libicui18n.so."~ICULib;
+                package static char[] icuuc = "libicuuc.so."~ICULib;
+                package static char[] icuin = "libicui18n.so."~ICULib;
                 }
         else
         version (darwin)
                 {
-                protected static char[] icuuc = "libicuuc.dylib."~ICULib;
-                protected static char[] icuin = "libicui18n.dylib."~ICULib;
+                package static char[] icuuc = "libicuuc.dylib."~ICULib;
+                package static char[] icuin = "libicui18n.dylib."~ICULib;
                 }
         else
            {
@@ -158,7 +158,7 @@
 
         ***********************************************************************/
 
-        protected enum  Error:int
+        package enum  UErrorCode:int
                         {
                         OK,
                         BufferOverflow=15
@@ -168,7 +168,7 @@
 
         ***********************************************************************/
 
-        protected static final bool isError (Error e)
+        package static final bool isError (UErrorCode e)
         {
                 return e > 0;
         }
@@ -177,7 +177,7 @@
 
         ***********************************************************************/
 
-        protected static final void exception (char[] msg)
+        package static final void exception (char[] msg)
         {
                 throw new ICUException (msg);
         }
@@ -186,7 +186,7 @@
 
         ***********************************************************************/
 
-        protected static final void testError (Error e, char[] msg)
+        package static final void testError (UErrorCode e, char[] msg)
         {
                 if (e > 0)
                     exception (msg);
@@ -296,6 +296,12 @@
         }
 }
 
+/*******************************************************************************
+
+*******************************************************************************/
+
+typedef void* UParseError;
+
 
 /*******************************************************************************
 
@@ -314,7 +320,7 @@
 
         ***********************************************************************/
 
-        class FunctionLoader
+        package static class FunctionLoader
         {
                 /***************************************************************
 
--- a/dwtx/dwtxhelper/mangoicu/UBreakIterator.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UBreakIterator.d	Mon Jul 07 15:53:07 2008 +0200
@@ -1,23 +1,23 @@
 /*******************************************************************************
 
         @file UBreakIterator.d
-        
+
         Copyright (c) 2004 Kris Bell
-        
+
         This software is provided 'as-is', without any express or implied
         warranty. In no event will the authors be held liable for damages
         of any kind arising from the use of this software.
-        
-        Permission is hereby granted to anyone to use this software for any 
-        purpose, including commercial applications, and to alter it and/or 
+
+        Permission is hereby granted to anyone to use this software for any
+        purpose, including commercial applications, and to alter it and/or
         redistribute it freely, subject to the following restrictions:
-        
-        1. The origin of this software must not be misrepresented; you must 
-           not claim that you wrote the original software. If you use this 
-           software in a product, an acknowledgment within documentation of 
+
+        1. The origin of this software must not be misrepresented; you must
+           not claim that you wrote the original software. If you use this
+           software in a product, an acknowledgment within documentation of
            said product would be appreciated but is not required.
 
-        2. Altered source versions must be plainly marked as such, and must 
+        2. Altered source versions must be plainly marked as such, and must
            not be misrepresented as being the original software.
 
         3. This notice may not be removed or altered from any distribution
@@ -30,11 +30,11 @@
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
-        @version        Initial version, November 2004      
+        @version        Initial version, November 2004
         @author         Kris
 
-        Note that this package and documentation is built around the ICU 
-        project (http://oss.software.ibm.com/icu/). Below is the license 
+        Note that this package and documentation is built around the ICU
+        project (http://oss.software.ibm.com/icu/). Below is the license
         statement as specified by that software:
 
 
@@ -45,7 +45,7 @@
 
         COPYRIGHT AND PERMISSION NOTICE
 
-        Copyright (c) 1995-2003 International Business Machines Corporation and 
+        Copyright (c) 1995-2003 International Business Machines Corporation and
         others.
 
         All rights reserved.
@@ -77,245 +77,251 @@
 
         ----------------------------------------------------------------------
 
-        All trademarks and registered trademarks mentioned herein are the 
+        All trademarks and registered trademarks mentioned herein are the
         property of their respective owners.
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UBreakIterator;
-
-private import  dwtx.dwthelper.mangoicu.ICU;
+module dwtx.dwtxhelper.mangoicu.UBreakIterator;
 
-public  import  dwtx.dwthelper.mangoicu.ULocale,
-                dwtx.dwthelper.mangoicu.UString;
-
-/*******************************************************************************
-
-*******************************************************************************/
+private import  dwtx.dwtxhelper.mangoicu.ICU;
 
-class UCharacterIterator : UBreakIterator
-{
-        /***********************************************************************
-        
-        ***********************************************************************/
+public  import  dwtx.dwtxhelper.mangoicu.ULocale,
+                dwtx.dwtxhelper.mangoicu.UText,
+                dwtx.dwtxhelper.mangoicu.UString;
 
-        this (inout ULocale locale, UText text = null)
-        {
-                super (Type.Character, locale, text);
-        }
-}
 
 
-/*******************************************************************************
-
-*******************************************************************************/
-
-class UWordIterator : UBreakIterator
-{
-        public enum     Break 
-                        {
-                        None = 0, 
-                        NoneLimit = 100, 
-                        Number = 100, 
-                        NumberLimit = 200,
-                        Letter = 200, 
-                        LetterLimit = 300, 
-                        Kana = 300, 
-                        KanaLimit = 400,
-                        Ideo = 400, 
-                        IdeoLimit = 500
-                        }
-
-        /***********************************************************************
-        
-        ***********************************************************************/
-
-        this (inout ULocale locale, UText text = null)
-        {
-                super (Type.Word, locale, text);
-        }
-
-        /***********************************************************************
-        
-                Return the status from the break rule that determined 
-                the most recently returned break position.
-
-        ***********************************************************************/
-
-        void getStatus (inout Break b)
-        {
-                b = cast(Break) super.getStatus();
-        }
-}
+// /*******************************************************************************
+//
+// *******************************************************************************/
+//
+// class UCharacterIterator : UBreakIterator
+// {
+//         /***********************************************************************
+//
+//         ***********************************************************************/
+//
+//         this (inout ULocale locale, UStringView text = null)
+//         {
+//                 super (Type.Character, locale, text);
+//         }
+// }
+//
+//
+// /*******************************************************************************
+//
+// *******************************************************************************/
+//
+// class UWordIterator : UBreakIterator
+// {
+//         public enum     Break
+//                         {
+//                         None = 0,
+//                         NoneLimit = 100,
+//                         Number = 100,
+//                         NumberLimit = 200,
+//                         Letter = 200,
+//                         LetterLimit = 300,
+//                         Kana = 300,
+//                         KanaLimit = 400,
+//                         Ideo = 400,
+//                         IdeoLimit = 500
+//                         }
+//
+//         /***********************************************************************
+//
+//         ***********************************************************************/
+//
+//         this (inout ULocale locale, UStringView text = null)
+//         {
+//                 super (Type.Word, locale, text);
+//         }
+//
+//         /***********************************************************************
+//
+//                 Return the status from the break rule that determined
+//                 the most recently returned break position.
+//
+//         ***********************************************************************/
+//
+//         void getStatus (inout Break b)
+//         {
+//                 b = cast(Break) super.getStatus();
+//         }
+// }
+//
+//
+// /*******************************************************************************
+//
+// *******************************************************************************/
+//
+// class ULineIterator : UBreakIterator
+// {
+//         public enum     Break
+//                         {
+//                         Soft = 0,
+//                         SoftLimit = 100,
+//                         Hard = 100,
+//                         HardLimit = 200
+//                         }
+//
+//         /***********************************************************************
+//
+//         ***********************************************************************/
+//
+//         this (inout ULocale locale, UStringView text = null)
+//         {
+//                 super (Type.Line, locale, text);
+//         }
+//
+//         /***********************************************************************
+//
+//                 Return the status from the break rule that determined
+//                 the most recently returned break position.
+//
+//         ***********************************************************************/
+//
+//         void getStatus (inout Break b)
+//         {
+//                 b = cast(Break) super.getStatus();
+//         }
+// }
+//
+//
+// /*******************************************************************************
+//
+// *******************************************************************************/
+//
+// class USentenceIterator : UBreakIterator
+// {
+//         public enum     Break
+//                         {
+//                         Term = 0,
+//                         TermLimit = 100,
+//                         Sep = 100,
+//                         Limit = 200
+//                         }
+//
+//         /***********************************************************************
+//
+//         ***********************************************************************/
+//
+//         this (inout ULocale locale, UStringView text = null)
+//         {
+//                 super (Type.Sentence, locale, text);
+//         }
+//
+//         /***********************************************************************
+//
+//                 Return the status from the break rule that determined
+//                 the most recently returned break position.
+//
+//         ***********************************************************************/
+//
+//         void getStatus (inout Break b)
+//         {
+//                 b = cast(Break) super.getStatus();
+//         }
+// }
+//
+//
+// /*******************************************************************************
+//
+// *******************************************************************************/
+//
+// class UTitleIterator : UBreakIterator
+// {
+//         /***********************************************************************
+//
+//         ***********************************************************************/
+//
+//         this (inout ULocale locale, UStringView text = null)
+//         {
+//                 super (Type.Title, locale, text);
+//         }
+// }
+//
+//
+// /*******************************************************************************
+//
+// *******************************************************************************/
+//
+// class URuleIterator : UBreakIterator
+// {
+//         /***********************************************************************
+//
+//                 Open a new UBreakIterator for locating text boundaries
+//                 using specified breaking rules
+//
+//         ***********************************************************************/
+//
+//         this (UStringView rules, UStringView text = null)
+//         {
+//                 UErrorCode e;
+//
+//                 handle = ubrk_openRules (rules.get.ptr, rules.length, text.get.ptr, text.length, null, e);
+//                 testError (e, "failed to open rule iterator");
+//         }
+// }
 
 
 /*******************************************************************************
 
-*******************************************************************************/
-
-class ULineIterator : UBreakIterator
-{
-        public enum     Break 
-                        {
-                        Soft = 0, 
-                        SoftLimit = 100, 
-                        Hard = 100, 
-                        HardLimit = 200
-                        }
-
-        /***********************************************************************
-        
-        ***********************************************************************/
-
-        this (inout ULocale locale, UText text = null)
-        {
-                super (Type.Line, locale, text);
-        }
-
-        /***********************************************************************
-        
-                Return the status from the break rule that determined 
-                the most recently returned break position.
-
-        ***********************************************************************/
-
-        void getStatus (inout Break b)
-        {
-                b = cast(Break) super.getStatus();
-        }
-}
-
-
-/*******************************************************************************
-
-*******************************************************************************/
-
-class USentenceIterator : UBreakIterator
-{
-        public enum     Break 
-                        {
-                        Term = 0, 
-                        TermLimit = 100, 
-                        Sep = 100, 
-                        Limit = 200
-                        }
-
-        /***********************************************************************
-        
-        ***********************************************************************/
-
-        this (inout ULocale locale, UText text = null)
-        {
-                super (Type.Sentence, locale, text);
-        }
-
-        /***********************************************************************
-        
-                Return the status from the break rule that determined 
-                the most recently returned break position.
-
-        ***********************************************************************/
-
-        void getStatus (inout Break b)
-        {
-                b = cast(Break) super.getStatus();
-        }
-}
-
-
-/*******************************************************************************
-
-*******************************************************************************/
-
-class UTitleIterator : UBreakIterator
-{
-        /***********************************************************************
-        
-        ***********************************************************************/
-
-        this (inout ULocale locale, UText text = null)
-        {
-                super (Type.Title, locale, text);
-        }
-}
-
-
-/*******************************************************************************
-
-*******************************************************************************/
-
-class URuleIterator : UBreakIterator
-{
-        /***********************************************************************
-        
-                Open a new UBreakIterator for locating text boundaries 
-                using specified breaking rules
-
-        ***********************************************************************/
-
-        this (UText rules, UText text = null)
-        {
-                Error e;
-
-                handle = ubrk_openRules (rules.get.ptr, rules.length, text.get.ptr, text.length, null, e);
-                testError (e, "failed to open rule iterator");
-        }
-}
-
-
-/*******************************************************************************
-
-        BreakIterator defines methods for finding the location of boundaries 
-        in text. Pointer to a UBreakIterator maintain a current position and 
+        BreakIterator defines methods for finding the location of boundaries
+        in text. Pointer to a UBreakIterator maintain a current position and
         scan over text returning the index of characters where boundaries occur.
 
-        Line boundary analysis determines where a text string can be broken 
-        when line-wrapping. The mechanism correctly handles punctuation and 
+        Line boundary analysis determines where a text string can be broken
+        when line-wrapping. The mechanism correctly handles punctuation and
         hyphenated words.
 
-        Sentence boundary analysis allows selection with correct interpretation 
-        of periods within numbers and abbreviations, and trailing punctuation 
+        Sentence boundary analysis allows selection with correct interpretation
+        of periods within numbers and abbreviations, and trailing punctuation
         marks such as quotation marks and parentheses.
 
-        Word boundary analysis is used by search and replace functions, as well 
-        as within text editing applications that allow the user to select words 
-        with a double click. Word selection provides correct interpretation of 
-        punctuation marks within and following words. Characters that are not 
-        part of a word, such as symbols or punctuation marks, have word-breaks 
+        Word boundary analysis is used by search and replace functions, as well
+        as within text editing applications that allow the user to select words
+        with a double click. Word selection provides correct interpretation of
+        punctuation marks within and following words. Characters that are not
+        part of a word, such as symbols or punctuation marks, have word-breaks
         on both sides.
 
-        Character boundary analysis allows users to interact with characters 
-        as they expect to, for example, when moving the cursor through a text 
-        string. Character boundary analysis provides correct navigation of 
-        through character strings, regardless of how the character is stored. 
-        For example, an accented character might be stored as a base character 
-        and a diacritical mark. What users consider to be a character can differ 
+        Character boundary analysis allows users to interact with characters
+        as they expect to, for example, when moving the cursor through a text
+        string. Character boundary analysis provides correct navigation of
+        through character strings, regardless of how the character is stored.
+        For example, an accented character might be stored as a base character
+        and a diacritical mark. What users consider to be a character can differ
         between languages.
 
-        Title boundary analysis locates all positions, typically starts of 
-        words, that should be set to Title Case when title casing the text. 
+        Title boundary analysis locates all positions, typically starts of
+        words, that should be set to Title Case when title casing the text.
 
         See <A HREF="http://oss.software.ibm.com/icu/apiref/ubrk_8h.html">
         this page</A> for full details.
 
 *******************************************************************************/
 
-private class UBreakIterator : ICU
-{       
-        package Handle  handle;  
+struct UBreakIterator
+{
+        typedef void _UBreakIterator;
+        alias _UBreakIterator* Handle;
+        Handle handle;
+        UText ut;
 
         // this is returned by next(), previous() etc ...
         const uint Done = uint.max;
 
         /***********************************************************************
-        
+
                 internal types passed to C API
 
         ***********************************************************************/
 
-        private  enum   Type    
-                        {  
-                        Character, 
+        private  enum   Type
+                        {
+                        Character,
                         Word,
                         Line,
                         Sentence,
@@ -323,58 +329,100 @@
                         }
 
 
+        public enum     WordBreak
+                        {
+                        None = 0,
+                        NoneLimit = 100,
+                        Number = 100,
+                        NumberLimit = 200,
+                        Letter = 200,
+                        LetterLimit = 300,
+                        Kana = 300,
+                        KanaLimit = 400,
+                        Ideo = 400,
+                        IdeoLimit = 500
+                        }
+        public enum     LineBreak
+                        {
+                        Soft = 0,
+                        SoftLimit = 100,
+                        Hard = 100,
+                        HardLimit = 200
+                        }
+        public enum     SentenceBreak
+                        {
+                        Term = 0,
+                        TermLimit = 100,
+                        Sep = 100,
+                        Limit = 200
+                        }
+
+
         /***********************************************************************
-        
-                Internal use only!
+
+                Open a new UBreakIterator for locating text boundaries for
+                a specified locale. A UBreakIterator may be used for detecting
+                character, line, word, and sentence breaks in text.
 
         ***********************************************************************/
 
-        private this ()
-        {
+        static UBreakIterator openWordIterator( ULocale locale, char[] str ){
+            UBreakIterator res;
+            res.ut.openUTF8(str);
+            auto e = ICU.UErrorCode.OK;
+            res.handle = ubrk_open( Type.Word, locale.name.ptr, null, 0, e);
+            ICU.testError (e, "failed to open word iterator");
+            ubrk_setUText( res.handle, & res.ut, e);
+            ICU.testError (e, "failed to set text in iterator");
+            return res;
+        }
+
+        static UBreakIterator openLineIterator( ULocale locale, char[] str ){
+            UBreakIterator res;
+            res.ut.openUTF8(str);
+            auto e = ICU.UErrorCode.OK;
+            res.handle = ubrk_open( Type.Line, locale.name.ptr, null, 0, e);
+            ICU.testError (e, "failed to open line iterator");
+            ubrk_setUText( res.handle, & res.ut, e);
+            ICU.testError (e, "failed to set text in iterator");
+            return res;
         }
 
         /***********************************************************************
-        
-                Open a new UBreakIterator for locating text boundaries for 
-                a specified locale. A UBreakIterator may be used for detecting 
-                character, line, word, and sentence breaks in text. 
 
-        ***********************************************************************/
-
-        this (Type type, inout ULocale locale, UText text)
-        {
-                Error e;
-
-                handle = ubrk_open (type, toString(locale.name), text.get.ptr, text.length, e);
-                testError (e, "failed to create break iterator");
-        }
-
-        /***********************************************************************
-        
                 Close a UBreakIterator
 
         ***********************************************************************/
 
-        ~this ()
+        void close ()
         {
+                ut.close();
                 ubrk_close (handle);
         }
 
         /***********************************************************************
-        
+
                 Sets an existing iterator to point to a new piece of text
 
         ***********************************************************************/
 
-        void setText (UText text)
+        void setText (UStringView text)
         {
-                Error e;
+                ICU.UErrorCode e;
                 ubrk_setText (handle, text.get.ptr, text.length, e);
-                testError (e, "failed to set iterator text");
+                ICU.testError (e, "failed to set iterator text");
+        }
+
+        void setText (char[] text)
+        {
+                auto e = ICU.UErrorCode.OK;
+                ut.openUTF8(text);
+                ubrk_setUText( handle, & ut, e);
+                ICU.testError (e, "failed to set text in iterator");
         }
 
         /***********************************************************************
-        
+
                 Determine the most recently-returned text boundary
 
         ***********************************************************************/
@@ -385,13 +433,13 @@
         }
 
         /***********************************************************************
-        
-                Determine the text boundary following the current text 
-                boundary, or UBRK_DONE if all text boundaries have been 
-                returned. 
-                
-                If offset is specified, determines the text boundary 
-                following the current text boundary: The value returned 
+
+                Determine the text boundary following the current text
+                boundary, or UBRK_DONE if all text boundaries have been
+                returned.
+
+                If offset is specified, determines the text boundary
+                following the current text boundary: The value returned
                 is always greater than offset, or Done
 
         ***********************************************************************/
@@ -404,12 +452,12 @@
         }
 
         /***********************************************************************
-        
-                Determine the text boundary preceding the current text 
+
+                Determine the text boundary preceding the current text
                 boundary, or Done if all text boundaries have been returned.
 
-                If offset is specified, determines the text boundary preceding 
-                the specified offset. The value returned is always smaller than 
+                If offset is specified, determines the text boundary preceding
+                the specified offset. The value returned is always smaller than
                 offset, or Done.
 
         ***********************************************************************/
@@ -422,10 +470,10 @@
         }
 
         /***********************************************************************
-        
-                Determine the index of the first character in the text 
-                being scanned. This is not always the same as index 0 
-                of the text. 
+
+                Determine the index of the first character in the text
+                being scanned. This is not always the same as index 0
+                of the text.
 
         ***********************************************************************/
 
@@ -435,9 +483,9 @@
         }
 
         /***********************************************************************
-        
-                Determine the index immediately beyond the last character 
-                in the text being scanned. This is not the same as the last 
+
+                Determine the index immediately beyond the last character
+                in the text being scanned. This is not the same as the last
                 character
 
         ***********************************************************************/
@@ -448,10 +496,10 @@
         }
 
         /***********************************************************************
-        
+
                 Returns true if the specfied position is a boundary position.
-                As a side effect, leaves the iterator pointing to the first 
-                boundary position at or after "offset". 
+                As a side effect, leaves the iterator pointing to the first
+                boundary position at or after "offset".
 
         ***********************************************************************/
 
@@ -461,8 +509,8 @@
         }
 
         /***********************************************************************
-        
-                Return the status from the break rule that determined 
+
+                Return the status from the break rule that determined
                 the most recently returned break position.
 
         ***********************************************************************/
@@ -473,15 +521,15 @@
         }
 
         /***********************************************************************
-        
-                Return the status from the break rule that determined 
+
+                Return the status from the break rule that determined
                 the most recently returned break position.
 
-                The values appear in the rule source within brackets, 
-                {123}, for example. For rules that do not specify a status, 
+                The values appear in the rule source within brackets,
+                {123}, for example. For rules that do not specify a status,
                 a default value of 0 is returned.
 
-                For word break iterators, the possible values are defined 
+                For word break iterators, the possible values are defined
                 in enum UWordBreak
 
         ***********************************************************************/
@@ -493,7 +541,7 @@
 
 
         /***********************************************************************
-        
+
                 Bind the ICU functions from a shared library. This is
                 complicated by the issues regarding D and DLLs on the
                 Windows platform
@@ -501,17 +549,17 @@
         ***********************************************************************/
 
         private static void* library;
-        
+
         /***********************************************************************
-                
+
         ***********************************************************************/
 
-        private static extern (C) 
+        private static extern (C)
         {
-                Handle function (uint, char*, wchar*, uint, inout Error) ubrk_open;
-                Handle function (wchar*, uint, wchar*, uint, void*, inout Error) ubrk_openRules;
+                Handle function (uint, char*, wchar*, uint, inout ICU.UErrorCode) ubrk_open;
+                Handle function (wchar*, uint, wchar*, uint, void*, inout ICU.UErrorCode) ubrk_openRules;
                 void   function (Handle) ubrk_close;
-                void   function (Handle, wchar*, uint, inout Error) ubrk_setText;
+                void   function (Handle, wchar*, uint, inout ICU.UErrorCode) ubrk_setText;
                 uint   function (Handle) ubrk_current;
                 uint   function (Handle) ubrk_next;
                 uint   function (Handle) ubrk_previous;
@@ -521,15 +569,17 @@
                 uint   function (Handle, uint) ubrk_following;
                 byte   function (Handle, uint) ubrk_isBoundary;
                 uint   function (Handle) ubrk_getRuleStatus;
+                Handle function (Handle, void *, int *, inout ICU.UErrorCode) ubrk_safeClone;
+                void   function (Handle, UText*, inout ICU.UErrorCode) ubrk_setUText;
         }
 
         /***********************************************************************
 
         ***********************************************************************/
 
-        static  FunctionLoader.Bind[] targets = 
+        static FunctionLoader.Bind[] targets =
                 [
-                {cast(void**) &ubrk_open,               "ubrk_open"}, 
+                {cast(void**) &ubrk_open,               "ubrk_open"},
                 {cast(void**) &ubrk_close,              "ubrk_close"},
                 {cast(void**) &ubrk_openRules,          "ubrk_openRules"},
                 {cast(void**) &ubrk_setText,            "ubrk_setText"},
@@ -542,6 +592,8 @@
                 {cast(void**) &ubrk_following,          "ubrk_following"},
                 {cast(void**) &ubrk_isBoundary,         "ubrk_isBoundary"},
                 {cast(void**) &ubrk_getRuleStatus,      "ubrk_getRuleStatus"},
+                {cast(void**) &ubrk_setUText,           "ubrk_setUText"},
+                {cast(void**) &ubrk_safeClone,          "ubrk_safeClone"},
                 ];
 
          /**********************************************************************
@@ -550,13 +602,13 @@
 
          static this ()
          {
-                library = FunctionLoader.bind (icuuc, targets);
+                library = FunctionLoader.bind (ICU.icuuc, targets);
          }
 
          /**********************************************************************
 
          **********************************************************************/
-               
+
          static ~this ()
          {
                FunctionLoader.unbind (library);
--- a/dwtx/dwtxhelper/mangoicu/UCalendar.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UCalendar.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,13 +82,13 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UCalendar;
+module dwtx.dwtxhelper.mangoicu.UCalendar;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
-public  import  dwtx.dwthelper.mangoicu.ULocale,
-                dwtx.dwthelper.mangoicu.UTimeZone;
+public  import  dwtx.dwtxhelper.mangoicu.ULocale,
+                dwtx.dwtxhelper.mangoicu.UTimeZone;
 
 /*******************************************************************************
 
@@ -244,7 +244,7 @@
 
         this (inout UTimeZone zone, inout ULocale locale, Type type = Type.Traditional)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = ucal_open (zone.name.ptr, zone.name.length, toString(locale.name), type, e);
                 testError (e, "failed to open calendar");
@@ -280,7 +280,7 @@
 
         void setTimeZone (inout UTimeZone zone)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_setTimeZone (handle, zone.name.ptr, zone.name.length, e);
                 testError (e, "failed to set calendar time zone");
@@ -294,7 +294,7 @@
 
         void getTimeZoneName (UString s, inout ULocale locale, DisplayNameType type=DisplayNameType.Standard)
         {       
-                uint format (wchar* dst, uint length, inout ICU.Error e)
+                uint format (wchar* dst, uint length, inout ICU.UErrorCode e)
                 {
                         return ucal_getTimeZoneDisplayName (handle, type, toString(locale.name), dst, length, e);
                 }
@@ -311,7 +311,7 @@
 
         bool inDaylightTime ()
         {
-                Error e;
+                UErrorCode e;
 
                 auto x = ucal_inDaylightTime (handle, e);
                 testError (e, "failed to test calendar daylight time");
@@ -338,7 +338,7 @@
 
         UDate getMillis ()
         {
-                Error e;
+                UErrorCode e;
 
                 auto x = ucal_getMillis (handle, e);
                 testError (e, "failed to get time");
@@ -354,7 +354,7 @@
 
         void setMillis (UDate date)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_setMillis (handle, date, e);
                 testError (e, "failed to set time");
@@ -368,7 +368,7 @@
 
         void setDate (uint year, Months month, uint date)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_setDate (handle, year, month, date, e);
                 testError (e, "failed to set date");
@@ -382,7 +382,7 @@
 
         void setDateTime (uint year, Months month, uint date, uint hour, uint minute, uint second)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_setDateTime (handle, year, month, date, hour, minute, second, e);
                 testError (e, "failed to set date/time");
@@ -444,7 +444,7 @@
 
         void add (DateFields field, uint amount)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_add (handle, field, amount, e);
                 testError (e, "failed to add to calendar");
@@ -459,7 +459,7 @@
 
         void roll (DateFields field, uint amount)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_roll (handle, field, amount, e);
                 testError (e, "failed to roll calendar");
@@ -473,7 +473,7 @@
 
         uint get (DateFields field)
         {
-                Error e;
+                UErrorCode e;
 
                 auto x = ucal_get (handle, field, e);
                 testError (e, "failed to get calendar field");
@@ -533,7 +533,7 @@
 
         uint getLimit (DateFields field, Limit type)
         {
-                Error e;
+                UErrorCode e;
 
                 auto x = ucal_getLimit (handle, field, type, e);
                 testError (e, "failed to get calendar limit");
@@ -593,27 +593,27 @@
 
         private static extern (C) 
         {
-                Handle  function (wchar*, uint, char*, Type, inout Error) ucal_open;
+                Handle  function (wchar*, uint, char*, Type, inout UErrorCode) ucal_open;
                 void    function (Handle) ucal_close;
                 UDate   function () ucal_getNow;
-                UDate   function (Handle, inout Error) ucal_getMillis;
-                void    function (Handle, UDate, inout Error) ucal_setMillis;
-                void    function (Handle, uint, uint, uint, inout Error) ucal_setDate;
-                void    function (Handle, uint, uint, uint, uint, uint, uint, inout Error) ucal_setDateTime;
+                UDate   function (Handle, inout UErrorCode) ucal_getMillis;
+                void    function (Handle, UDate, inout UErrorCode) ucal_setMillis;
+                void    function (Handle, uint, uint, uint, inout UErrorCode) ucal_setDate;
+                void    function (Handle, uint, uint, uint, uint, uint, uint, inout UErrorCode) ucal_setDateTime;
                 byte    function (Handle, Handle) ucal_equivalentTo;
-                void    function (Handle, uint, uint, inout Error) ucal_add;
-                void    function (Handle, uint, uint, inout Error) ucal_roll;
-                uint    function (Handle, uint, inout Error) ucal_get;
+                void    function (Handle, uint, uint, inout UErrorCode) ucal_add;
+                void    function (Handle, uint, uint, inout UErrorCode) ucal_roll;
+                uint    function (Handle, uint, inout UErrorCode) ucal_get;
                 void    function (Handle, uint, uint) ucal_set;
                 byte    function (Handle, uint) ucal_isSet;
                 void    function (Handle, uint) ucal_clearField;
                 void    function (Handle) ucal_clear;
-                uint    function (Handle, uint, uint, inout Error) ucal_getLimit;
-                void    function (Handle, wchar*, uint, inout Error) ucal_setTimeZone;
+                uint    function (Handle, uint, uint, inout UErrorCode) ucal_getLimit;
+                void    function (Handle, wchar*, uint, inout UErrorCode) ucal_setTimeZone;
                 byte    function (Handle, uint) ucal_inDaylightTime;
                 uint    function (Handle, uint) ucal_getAttribute;
                 void    function (Handle, uint, uint) ucal_setAttribute;
-                uint    function (Handle, uint, char*, wchar*, uint, inout Error) ucal_getTimeZoneDisplayName;
+                uint    function (Handle, uint, char*, wchar*, uint, inout UErrorCode) ucal_getTimeZoneDisplayName;
         }
 
         /***********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/UChar.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UChar.d	Mon Jul 07 15:53:07 2008 +0200
@@ -83,9 +83,9 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UChar;
+module dwtx.dwtxhelper.mangoicu.UChar;
 
-private import  dwtx.dwthelper.mangoicu.ICU;
+private import  dwtx.dwtxhelper.mangoicu.ICU;
 
 /*******************************************************************************
 
@@ -672,7 +672,7 @@
 
         char[] getCharName (dchar c, CharNameChoice choice, inout char[] dst)
         {
-                Error e;
+                UErrorCode e;
 
                 uint len = u_charName (c, choice, dst.ptr, dst.length, e);
                 testError (e, "failed to extract char name (buffer too small?)");
@@ -687,7 +687,7 @@
 
         char[] getComment (dchar c, inout char[] dst)
         {
-                Error e;
+                UErrorCode e;
 
                 uint len = u_getISOComment (c, dst.ptr, dst.length, e);
                 testError (e, "failed to extract comment (buffer too small?)");
@@ -703,7 +703,7 @@
 
         dchar charFromName (CharNameChoice choice, char[] name)
         {
-                Error e;
+                UErrorCode e;
 
                 dchar c = u_charFromName (choice, toString(name), e);
                 testError (e, "failed to locate char name");
@@ -1152,9 +1152,9 @@
                 uint   function (uint) u_getIntPropertyMaxValue;
                 uint   function (dchar) u_charDirection;
                 uint   function (dchar) ublock_getCode;
-                uint   function (dchar, uint, char*, uint, inout Error) u_charName;
-                uint   function (dchar, char*, uint, inout Error) u_getISOComment;
-                uint   function (uint, char*, inout Error) u_charFromName;
+                uint   function (dchar, uint, char*, uint, inout UErrorCode) u_charName;
+                uint   function (dchar, char*, uint, inout UErrorCode) u_getISOComment;
+                uint   function (uint, char*, inout UErrorCode) u_charFromName;
                 char*  function (uint, uint) u_getPropertyName;
                 char*  function (uint, uint, uint) u_getPropertyValueName;
                 void   function (inout Version) u_getUnicodeVersion;
--- a/dwtx/dwtxhelper/mangoicu/UCollator.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UCollator.d	Mon Jul 07 15:53:07 2008 +0200
@@ -1,23 +1,23 @@
 /*******************************************************************************
 
         @file UCollator.d
-        
+
         Copyright (c) 2004 Kris Bell
-        
+
         This software is provided 'as-is', without any express or implied
         warranty. In no event will the authors be held liable for damages
         of any kind arising from the use of this software.
-        
-        Permission is hereby granted to anyone to use this software for any 
-        purpose, including commercial applications, and to alter it and/or 
+
+        Permission is hereby granted to anyone to use this software for any
+        purpose, including commercial applications, and to alter it and/or
         redistribute it freely, subject to the following restrictions:
-        
-        1. The origin of this software must not be misrepresented; you must 
-           not claim that you wrote the original software. If you use this 
-           software in a product, an acknowledgment within documentation of 
+
+        1. The origin of this software must not be misrepresented; you must
+           not claim that you wrote the original software. If you use this
+           software in a product, an acknowledgment within documentation of
            said product would be appreciated but is not required.
 
-        2. Altered source versions must be plainly marked as such, and must 
+        2. Altered source versions must be plainly marked as such, and must
            not be misrepresented as being the original software.
 
         3. This notice may not be removed or altered from any distribution
@@ -30,11 +30,11 @@
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
-        @version        Initial version, November 2004      
+        @version        Initial version, November 2004
         @author         Kris
 
-        Note that this package and documentation is built around the ICU 
-        project (http://oss.software.ibm.com/icu/). Below is the license 
+        Note that this package and documentation is built around the ICU
+        project (http://oss.software.ibm.com/icu/). Below is the license
         statement as specified by that software:
 
 
@@ -45,7 +45,7 @@
 
         COPYRIGHT AND PERMISSION NOTICE
 
-        Copyright (c) 1995-2003 International Business Machines Corporation and 
+        Copyright (c) 1995-2003 International Business Machines Corporation and
         others.
 
         All rights reserved.
@@ -77,35 +77,35 @@
 
         ----------------------------------------------------------------------
 
-        All trademarks and registered trademarks mentioned herein are the 
+        All trademarks and registered trademarks mentioned herein are the
         property of their respective owners.
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UCollator;
+module dwtx.dwtxhelper.mangoicu.UCollator;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.USet,
-                dwtx.dwthelper.mangoicu.ULocale,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.USet,
+                dwtx.dwtxhelper.mangoicu.ULocale,
+                dwtx.dwtxhelper.mangoicu.UString;
 
 /*******************************************************************************
 
-        The API for Collator performs locale-sensitive string comparison. 
-        You use this service to build searching and sorting routines for 
-        natural language text. Important: The ICU collation service has been 
-        reimplemented in order to achieve better performance and UCA compliance. 
+        The API for Collator performs locale-sensitive string comparison.
+        You use this service to build searching and sorting routines for
+        natural language text. Important: The ICU collation service has been
+        reimplemented in order to achieve better performance and UCA compliance.
         For details, see the collation design document.
 
         For more information about the collation service see the users guide.
 
-        Collation service provides correct sorting orders for most locales 
-        supported in ICU. If specific data for a locale is not available, 
+        Collation service provides correct sorting orders for most locales
+        supported in ICU. If specific data for a locale is not available,
         the orders eventually falls back to the UCA sort order.
 
-        Sort ordering may be customized by providing your own set of rules. 
-        For more on this subject see the Collation customization section of 
-        the users guide. 
+        Sort ordering may be customized by providing your own set of rules.
+        For more on this subject see the Collation customization section of
+        the users guide.
 
         See <A HREF="http://oss.software.ibm.com/icu/apiref/ucol_8h.html">
         this page</A> for full details.
@@ -113,57 +113,55 @@
 *******************************************************************************/
 
 class UCollator : ICU
-{       
+{
         package Handle handle;
-        
-        typedef void* UParseError;
 
-        enum    Attribute 
+        enum    Attribute
                 {
-                FrenchCollation, 
-                AlternateHandling, 
-                CaseFirst, 
+                FrenchCollation,
+                AlternateHandling,
+                CaseFirst,
                 CaseLevel,
-                NormalizationMode, 
-                DecompositionMode = NormalizationMode, 
-                strength, 
+                NormalizationMode,
+                DecompositionMode = NormalizationMode,
+                strength,
                 HiraganaQuaternaryMode,
-                NumericCollation, 
+                NumericCollation,
                 AttributeCount
                 }
 
-        enum    AttributeValue 
+        enum    AttributeValue
                 {
-                Default = -1, 
-                Primary = 0, 
-                Secondary = 1, 
+                Default = -1,
+                Primary = 0,
+                Secondary = 1,
                 Tertiary = 2,
-                DefaultStrength = Tertiary, 
-                CeStrengthLimit, 
-                Quaternary = 3, 
+                DefaultStrength = Tertiary,
+                CeStrengthLimit,
+                Quaternary = 3,
                 Identical = 15,
-                strengthLimit, 
-                Off = 16, 
-                On = 17, 
+                strengthLimit,
+                Off = 16,
+                On = 17,
                 Shifted = 20,
-                NonIgnorable = 21, 
-                LowerFirst = 24, 
-                UpperFirst = 25, 
+                NonIgnorable = 21,
+                LowerFirst = 24,
+                UpperFirst = 25,
                 AttributeValueCount
                 }
 
-         enum   RuleOption 
-                { 
-                TailoringOnly, 
-                FullRules  
+         enum   RuleOption
+                {
+                TailoringOnly,
+                FullRules
                 }
 
-         enum   BoundMode 
-                { 
-                BoundLower = 0, 
-                BoundUpper = 1, 
-                BoundUpperLong = 2, 
-                BoundValueCount  
+         enum   BoundMode
+                {
+                BoundLower = 0,
+                BoundUpper = 1,
+                BoundUpperLong = 2,
+                BoundValueCount
                 }
 
         typedef AttributeValue Strength;
@@ -171,16 +169,16 @@
         /***********************************************************************
 
                 Open a UCollator for comparing strings. The locale specified
-                determines the required collation rules. Special values for 
-                locales can be passed in - if ULocale.Default is passed for 
-                the locale, the default locale collation rules will be used. 
+                determines the required collation rules. Special values for
+                locales can be passed in - if ULocale.Default is passed for
+                the locale, the default locale collation rules will be used.
                 If ULocale.Root is passed, UCA rules will be used
 
         ***********************************************************************/
 
         this (ULocale locale)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = ucol_open (toString(locale.name), e);
                 testError (e, "failed to open collator");
@@ -189,16 +187,16 @@
         /***********************************************************************
 
                 Produce a UCollator instance according to the rules supplied.
-        
-                The rules are used to change the default ordering, defined in 
-                the UCA in a process called tailoring. For the syntax of the 
+
+                The rules are used to change the default ordering, defined in
+                the UCA in a process called tailoring. For the syntax of the
                 rules please see users guide
 
         ***********************************************************************/
 
-        this (UText rules, AttributeValue mode, Strength strength)
+        this (UStringView rules, AttributeValue mode, Strength strength)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = ucol_openRules (rules.get.ptr, rules.len, mode, strength, null, e);
                 testError (e, "failed to open rules-based collator");
@@ -206,23 +204,23 @@
 
         /***********************************************************************
 
-                Open a collator defined by a short form string. The 
-                structure and the syntax of the string is defined in 
-                the "Naming collators" section of the users guide: 
-                http://oss.software.ibm.com/icu/userguide/Collate_Concepts.html#Naming_Collators 
-                Attributes are overriden by the subsequent attributes. 
-                So, for "S2_S3", final strength will be 3. 3066bis 
-                locale overrides individual locale parts. 
-                
-                The call to this constructor is equivalent to a plain 
-                constructor, followed by a series of calls to setAttribute 
+                Open a collator defined by a short form string. The
+                structure and the syntax of the string is defined in
+                the "Naming collators" section of the users guide:
+                http://oss.software.ibm.com/icu/userguide/Collate_Concepts.html#Naming_Collators
+                Attributes are overriden by the subsequent attributes.
+                So, for "S2_S3", final strength will be 3. 3066bis
+                locale overrides individual locale parts.
+
+                The call to this constructor is equivalent to a plain
+                constructor, followed by a series of calls to setAttribute
                 and setVariableTop
 
         ***********************************************************************/
 
         this (char[] shortName, bool forceDefaults)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = ucol_openFromShortString (toString(shortName), forceDefaults, null, e);
                 testError (e, "failed to open short-name collator");
@@ -240,7 +238,7 @@
         }
 
         /***********************************************************************
-        
+
                 Close a UCollator
 
         ***********************************************************************/
@@ -251,76 +249,76 @@
         }
 
         /***********************************************************************
-        
-                Get a set containing the contractions defined by the 
+
+                Get a set containing the contractions defined by the
                 collator.
 
-                The set includes both the UCA contractions and the 
-                contractions defined by the collator. This set will 
-                contain only strings. If a tailoring explicitly 
-                suppresses contractions from the UCA (like Russian), 
-                removed contractions will not be in the resulting set. 
+                The set includes both the UCA contractions and the
+                contractions defined by the collator. This set will
+                contain only strings. If a tailoring explicitly
+                suppresses contractions from the UCA (like Russian),
+                removed contractions will not be in the resulting set.
 
         ***********************************************************************/
 
         void getContractions (USet set)
         {
-                Error e;
+                UErrorCode e;
 
                 ucol_getContractions (handle, set.handle, e);
                 testError (e, "failed to get collator contractions");
         }
 
         /***********************************************************************
-        
+
                 Compare two strings. Return value is -, 0, +
 
         ***********************************************************************/
 
-        int strcoll (UText source, UText target)
+        int strcoll (UStringView source, UStringView target)
         {
                 return ucol_strcoll (handle, source.get.ptr, source.len, target.get.ptr, target.len);
         }
-       
+
         /***********************************************************************
-        
-                Determine if one string is greater than another. This 
-                function is equivalent to strcoll() > 1 
+
+                Determine if one string is greater than another. This
+                function is equivalent to strcoll() > 1
 
         ***********************************************************************/
 
-        bool greater (UText source, UText target)
+        bool greater (UStringView source, UStringView target)
         {
                 return ucol_greater (handle, source.get.ptr, source.len, target.get.ptr, target.len) != 0;
         }
-       
+
         /***********************************************************************
-        
-                Determine if one string is greater than or equal to 
+
+                Determine if one string is greater than or equal to
                 another. This function is equivalent to strcoll() >= 0
-                 
+
         ***********************************************************************/
 
-        bool greaterOrEqual (UText source, UText target)
+        bool greaterOrEqual (UStringView source, UStringView target)
         {
                 return ucol_greaterOrEqual (handle, source.get.ptr, source.len, target.get.ptr, target.len) != 0;
         }
-       
+
         /***********************************************************************
-        
+
                 This function is equivalent to strcoll() == 0
 
         ***********************************************************************/
 
-        bool equal (UText source, UText target)
+        bool equal (UStringView source, UStringView target)
         {
                 return ucol_equal (handle, source.get.ptr, source.len, target.get.ptr, target.len) != 0;
         }
-       
+
         /***********************************************************************
-        
-                Get the collation strength used in a UCollator. The 
-                strength influences how strings are compared. 
+
+                Get the collation strength used in a UCollator. The
+                strength influences how strings are compared.
 
         ***********************************************************************/
 
@@ -328,11 +326,11 @@
         {
                 return ucol_getStrength (handle);
         }
-       
+
         /***********************************************************************
-        
-                Set the collation strength used in this UCollator. The 
-                strength influences how strings are compared. one of 
+
+                Set the collation strength used in this UCollator. The
+                strength influences how strings are compared. one of
                 Primary, Secondary, Tertiary, Quaternary, Dentical, or
                 Default
 
@@ -342,34 +340,34 @@
         {
                 ucol_setStrength (handle, s);
         }
-       
+
         /***********************************************************************
-        
-                Get the display name for a UCollator. The display name is 
+
+                Get the display name for a UCollator. The display name is
                 suitable for presentation to a user
 
         ***********************************************************************/
 
         void getDisplayName (ULocale obj, ULocale display, UString dst)
         {
-                uint fmt (wchar* p, uint len, inout Error e)
+                uint fmt (wchar* p, uint len, inout UErrorCode e)
                 {
                         return ucol_getDisplayName (toString(obj.name), toString(display.name), dst.get.ptr, dst.len, e);
                 }
 
                 dst.format (&fmt, "failed to get collator display name");
         }
-       
+
         /***********************************************************************
-        
-                Returns current rules. Options define whether full rules 
-                are returned or just the tailoring. 
+
+                Returns current rules. Options define whether full rules
+                are returned or just the tailoring.
 
         ***********************************************************************/
 
         void getRules (UString dst, RuleOption o = RuleOption.FullRules)
         {
-                uint fmt (wchar* p, uint len, inout Error e)
+                uint fmt (wchar* p, uint len, inout UErrorCode e)
                 {
                         uint needed = ucol_getRulesEx (handle, o, dst.get.ptr, dst.len);
                         if (needed > len)
@@ -379,128 +377,128 @@
 
                 dst.format (&fmt, "failed to get collator rules");
         }
-       
+
         /***********************************************************************
-        
+
                 Get the short definition string for a collator.
 
-                This API harvests the collator's locale and the attribute 
-                set and produces a string that can be used for opening a 
-                collator with the same properties using the char[] style 
-                constructor. This string will be normalized. 
-                
-                The structure and the syntax of the string is defined in the 
-                "Naming collators" section of the users guide: 
+                This API harvests the collator's locale and the attribute
+                set and produces a string that can be used for opening a
+                collator with the same properties using the char[] style
+                constructor. This string will be normalized.
+
+                The structure and the syntax of the string is defined in the
+                "Naming collators" section of the users guide:
                 http://oss.software.ibm.com/icu/userguide/Collate_Concepts.html#Naming_Collators
 
         ***********************************************************************/
 
         char[] getShortDefinitionString (ULocale locale = ULocale.Default)
         {
-                Error    e;
+                UErrorCode    e;
                 char[64] dst;
 
                 uint len = ucol_getShortDefinitionString (handle, toString(locale.name), dst.ptr, dst.length, e);
                 testError (e, "failed to get collator short name");
                 return dst[0..len].dup;
         }
-       
+
         /***********************************************************************
-        
-                Verifies and normalizes short definition string. Normalized 
-                short definition string has all the option sorted by the 
-                argument name, so that equivalent definition strings are the 
+
+                Verifies and normalizes short definition string. Normalized
+                short definition string has all the option sorted by the
+                argument name, so that equivalent definition strings are the
                 same
 
         ***********************************************************************/
 
         char[] normalizeShortDefinitionString (char[] source)
         {
-                Error    e;
+                UErrorCode    e;
                 char[64] dst;
 
                 uint len = ucol_normalizeShortDefinitionString (toString(source), dst.ptr, dst.length, null, e);
                 testError (e, "failed to normalize collator short name");
                 return dst[0..len].dup;
         }
-       
+
         /***********************************************************************
-                
-                  Get a sort key for a string from a UCollator. Sort keys 
-                  may be compared using strcmp. 
+
+                  Get a sort key for a string from a UCollator. Sort keys
+                  may be compared using strcmp.
 
         ***********************************************************************/
 
-        ubyte[] getSortKey (UText t, ubyte[] result)
+        ubyte[] getSortKey (UStringView t, ubyte[] result)
         {
                 uint len = ucol_getSortKey (handle, t.get.ptr, t.len, result.ptr, result.length);
-                if (len < result.length) 
+                if (len < result.length)
                     return result [0..len];
                  return null;
         }
-       
+
         /***********************************************************************
-                
-                Merge two sort keys. The levels are merged with their 
-                corresponding counterparts (primaries with primaries, 
-                secondaries with secondaries etc.). Between the values 
-                from the same level a separator is inserted. example 
-                (uncompressed): 191B1D 01 050505 01 910505 00 and 
-                1F2123 01 050505 01 910505 00 will be merged as 
-                191B1D 02 1F212301 050505 02 050505 01 910505 02 910505 00 
-                This allows for concatenating of first and last names for 
-                sorting, among other things. If the destination buffer is 
-                not big enough, the results are undefined. If any of source 
-                lengths are zero or any of source pointers are null/undefined, 
-                result is of size zero. 
+
+                Merge two sort keys. The levels are merged with their
+                corresponding counterparts (primaries with primaries,
+                secondaries with secondaries etc.). Between the values
+                from the same level a separator is inserted. example
+                (uncompressed): 191B1D 01 050505 01 910505 00 and
+                1F2123 01 050505 01 910505 00 will be merged as
+                191B1D 02 1F212301 050505 02 050505 01 910505 02 910505 00
+                This allows for concatenating of first and last names for
+                sorting, among other things. If the destination buffer is
+                not big enough, the results are undefined. If any of source
+                lengths are zero or any of source pointers are null/undefined,
+                result is of size zero.
 
         ***********************************************************************/
 
         ubyte[] mergeSortkeys (ubyte[] left, ubyte[] right, ubyte[] result)
         {
                 uint len = ucol_mergeSortkeys (left.ptr, left.length, right.ptr, right.length, result.ptr, result.length);
-                if (len < result.length) 
+                if (len < result.length)
                     return result [0..len];
                  return null;
         }
-       
+
         /***********************************************************************
-        
+
                 Produce a bound for a given sortkey and a number of levels.
 
-                Return value is always the number of bytes needed, regardless 
+                Return value is always the number of bytes needed, regardless
                 of whether the result buffer was big enough or even valid.
 
-                Resulting bounds can be used to produce a range of strings 
-                that are between upper and lower bounds. For example, if 
-                bounds are produced for a sortkey of string "smith", strings 
-                between upper and lower bounds with one level would include 
+                Resulting bounds can be used to produce a range of strings
+                that are between upper and lower bounds. For example, if
+                bounds are produced for a sortkey of string "smith", strings
+                between upper and lower bounds with one level would include
                 "Smith", "SMITH", "sMiTh".
 
-                There are two upper bounds that can be produced. If BoundUpper 
-                is produced, strings matched would be as above. However, if 
-                bound produced using BoundUpperLong is used, the above example 
+                There are two upper bounds that can be produced. If BoundUpper
+                is produced, strings matched would be as above. However, if
+                bound produced using BoundUpperLong is used, the above example
                 will also match "Smithsonian" and similar.
 
         ***********************************************************************/
 
         ubyte[] getBound (BoundMode mode, ubyte[] source, ubyte[] result, uint levels = 1)
         {
-                Error e;
+                UErrorCode e;
 
                 uint len = ucol_getBound (source.ptr, source.length, mode, levels, result.ptr, result.length, e);
                 testError (e, "failed to get sortkey bound");
-                if (len < result.length) 
+                if (len < result.length)
                     return result [0..len];
                  return null;
         }
-       
+
         /***********************************************************************
-        
+
                 Gets the version information for a Collator.
 
-                Version is currently an opaque 32-bit number which depends, 
-                among other things, on major versions of the collator 
+                Version is currently an opaque 32-bit number which depends,
+                among other things, on major versions of the collator
                 tailoring and UCA
 
         ***********************************************************************/
@@ -511,7 +509,7 @@
         }
 
         /***********************************************************************
-        
+
                 Gets the UCA version information for this Collator
 
         ***********************************************************************/
@@ -522,28 +520,28 @@
         }
 
         /***********************************************************************
-        
+
                 Universal attribute setter
 
         ***********************************************************************/
 
         void setAttribute (Attribute attr, AttributeValue value)
         {
-                Error e;
+                UErrorCode e;
 
                 ucol_setAttribute (handle, attr, value, e);
                 testError (e, "failed to set collator attribute");
         }
 
         /***********************************************************************
-        
+
                 Universal attribute getter
 
         ***********************************************************************/
 
         AttributeValue getAttribute (Attribute attr)
         {
-                Error e;
+                UErrorCode e;
 
                 AttributeValue v = ucol_getAttribute (handle, attr, e);
                 testError (e, "failed to get collator attribute");
@@ -551,48 +549,48 @@
         }
 
         /***********************************************************************
-        
-                Variable top is a two byte primary value which causes all 
-                the codepoints with primary values that are less or equal 
-                than the variable top to be shifted when alternate handling 
+
+                Variable top is a two byte primary value which causes all
+                the codepoints with primary values that are less or equal
+                than the variable top to be shifted when alternate handling
                 is set to Shifted.
 
         ***********************************************************************/
 
-        void setVariableTop (UText t)
+        void setVariableTop (UStringView t)
         {
-                Error e;
+                UErrorCode e;
 
                 ucol_setVariableTop (handle, t.get.ptr, t.len, e);
                 testError (e, "failed to set variable-top");
         }
 
         /***********************************************************************
-        
-                Sets the variable top to a collation element value 
-                supplied.Variable top is set to the upper 16 bits. 
-                Lower 16 bits are ignored. 
-                
+
+                Sets the variable top to a collation element value
+                supplied.Variable top is set to the upper 16 bits.
+                Lower 16 bits are ignored.
+
         ***********************************************************************/
 
         void setVariableTop (uint x)
         {
-                Error e;
+                UErrorCode e;
 
                 ucol_restoreVariableTop (handle, x, e);
                 testError (e, "failed to restore variable-top");
         }
 
         /***********************************************************************
-                
-                Gets the variable top value of this Collator. Lower 16 bits 
-                are undefined and should be ignored. 
+
+                Gets the variable top value of this Collator. Lower 16 bits
+                are undefined and should be ignored.
 
         ***********************************************************************/
 
         uint getVariableTop ()
         {
-                Error e;
+                UErrorCode e;
 
                 uint x = ucol_getVariableTop (handle, e);
                 testError (e, "failed to get variable-top");
@@ -600,8 +598,8 @@
         }
 
         /***********************************************************************
-        
-                Gets the locale name of the collator. If the collator is 
+
+                Gets the locale name of the collator. If the collator is
                 instantiated from the rules, then this function will throw
                 an exception
 
@@ -609,7 +607,7 @@
 
         void getLocale (ULocale locale, ULocale.Type type)
         {
-                Error e;
+                UErrorCode e;
 
                 locale.name = toArray (ucol_getLocaleByType (handle, type, e));
                 if (isError(e) || locale.name is null)
@@ -617,15 +615,15 @@
         }
 
         /***********************************************************************
-        
-                Get the Unicode set that contains all the characters and 
+
+                Get the Unicode set that contains all the characters and
                 sequences tailored in this collator.
 
         ***********************************************************************/
 
         USet getTailoredSet ()
         {
-                Error e;
+                UErrorCode e;
 
                 Handle h = ucol_getTailoredSet (handle, e);
                 testError (e, "failed to get tailored set");
@@ -634,7 +632,7 @@
 
 
         /***********************************************************************
-        
+
                 Bind the ICU functions from a shared library. This is
                 complicated by the issues regarding D and DLLs on the
                 Windows platform
@@ -647,44 +645,44 @@
 
         ***********************************************************************/
 
-        private static extern (C) 
+        private static extern (C)
         {
                 void            function (Handle) ucol_close;
-                Handle          function (char *loc, inout Error e) ucol_open;
-                Handle          function (wchar* rules, uint rulesLength, AttributeValue normalizationMode, Strength strength, UParseError *parseError, inout Error e) ucol_openRules;
-                Handle          function (char *definition, byte forceDefaults, UParseError *parseError, inout Error e) ucol_openFromShortString;
-                uint            function (Handle, Handle conts, inout Error e) ucol_getContractions;
+                Handle          function (char *loc, inout UErrorCode e) ucol_open;
+                Handle          function (wchar* rules, uint rulesLength, AttributeValue normalizationMode, Strength strength, UParseError *parseError, inout UErrorCode e) ucol_openRules;
+                Handle          function (char *definition, byte forceDefaults, UParseError *parseError, inout UErrorCode e) ucol_openFromShortString;
+                uint            function (Handle, Handle conts, inout UErrorCode e) ucol_getContractions;
                 int             function (Handle, wchar* source, uint sourceLength, wchar* target, uint targetLength) ucol_strcoll;
                 byte            function (Handle, wchar* source, uint sourceLength, wchar* target, uint targetLength) ucol_greater;
                 byte            function (Handle, wchar* source, uint sourceLength, wchar* target, uint targetLength) ucol_greaterOrEqual;
                 byte            function (Handle, wchar* source, uint sourceLength, wchar* target, uint targetLength) ucol_equal;
                 Strength        function (Handle) ucol_getStrength;
                 void            function (Handle, Strength strength) ucol_setStrength;
-                uint            function (char *objLoc, char *dispLoc, wchar* result, uint resultLength, inout Error e) ucol_getDisplayName;
-                uint            function (Handle, char *locale, char *buffer, uint capacity, inout Error e) ucol_getShortDefinitionString;
-                uint            function (char *source, char *destination, uint capacity, UParseError *parseError, inout Error e) ucol_normalizeShortDefinitionString;
+                uint            function (char *objLoc, char *dispLoc, wchar* result, uint resultLength, inout UErrorCode e) ucol_getDisplayName;
+                uint            function (Handle, char *locale, char *buffer, uint capacity, inout UErrorCode e) ucol_getShortDefinitionString;
+                uint            function (char *source, char *destination, uint capacity, UParseError *parseError, inout UErrorCode e) ucol_normalizeShortDefinitionString;
                 uint            function (Handle, wchar* source, uint sourceLength, ubyte *result, uint resultLength) ucol_getSortKey;
-                uint            function (ubyte *source, uint sourceLength, BoundMode boundType, uint noOfLevels, ubyte *result, uint resultLength, inout Error e) ucol_getBound;
+                uint            function (ubyte *source, uint sourceLength, BoundMode boundType, uint noOfLevels, ubyte *result, uint resultLength, inout UErrorCode e) ucol_getBound;
                 void            function (Handle, Version info) ucol_getVersion;
                 void            function (Handle, Version info) ucol_getUCAVersion;
                 uint            function (ubyte *src1, uint src1Length, ubyte *src2, uint src2Length, ubyte *dest, uint destCapacity) ucol_mergeSortkeys;
-                void            function (Handle, Attribute attr, AttributeValue value, inout Error e) ucol_setAttribute;
-                AttributeValue  function (Handle, Attribute attr, inout Error e) ucol_getAttribute;
-                uint            function (Handle, wchar* varTop, uint len, inout Error e) ucol_setVariableTop;
-                uint            function (Handle, inout Error e) ucol_getVariableTop;
-                void            function (Handle, uint varTop, inout Error e) ucol_restoreVariableTop;
+                void            function (Handle, Attribute attr, AttributeValue value, inout UErrorCode e) ucol_setAttribute;
+                AttributeValue  function (Handle, Attribute attr, inout UErrorCode e) ucol_getAttribute;
+                uint            function (Handle, wchar* varTop, uint len, inout UErrorCode e) ucol_setVariableTop;
+                uint            function (Handle, inout UErrorCode e) ucol_getVariableTop;
+                void            function (Handle, uint varTop, inout UErrorCode e) ucol_restoreVariableTop;
                 uint            function (Handle, RuleOption delta, wchar* buffer, uint bufferLen) ucol_getRulesEx;
-                char*           function (Handle, ULocale.Type type, inout Error e) ucol_getLocaleByType;
-                Handle          function (Handle, inout Error e) ucol_getTailoredSet;
+                char*           function (Handle, ULocale.Type type, inout UErrorCode e) ucol_getLocaleByType;
+                Handle          function (Handle, inout UErrorCode e) ucol_getTailoredSet;
         }
 
         /***********************************************************************
 
         ***********************************************************************/
 
-        static  FunctionLoader.Bind[] targets = 
+        static  FunctionLoader.Bind[] targets =
                 [
-                {cast(void**) &ucol_open,                               "ucol_open"}, 
+                {cast(void**) &ucol_open,                               "ucol_open"},
                 {cast(void**) &ucol_close,                              "ucol_close"},
                 {cast(void**) &ucol_openRules,                          "ucol_openRules"},
                 {cast(void**) &ucol_openFromShortString,                "ucol_openFromShortString"},
--- a/dwtx/dwtxhelper/mangoicu/UConverter.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UConverter.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,9 +82,9 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UConverter;
+module dwtx.dwtxhelper.mangoicu.UConverter;
 
-private import dwtx.dwthelper.mangoicu.ICU;
+private import dwtx.dwtxhelper.mangoicu.ICU;
 
 /*******************************************************************************
 
@@ -158,7 +158,7 @@
 
         this (char[] name)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = ucnv_open (toString (name), e);
                 if (isError (e))
@@ -317,7 +317,7 @@
 
         char[] getName ()
         {
-                Error e;
+                UErrorCode e;
 
                 char[] name = toArray (ucnv_getName (handle, e));
                 testError (e, "failed to get converter name");
@@ -352,7 +352,7 @@
 
         static final char[] detectSignature (void[] input)
         {
-                Error   e;
+                UErrorCode   e;
                 uint    len;
                 char*   name;
 
@@ -440,7 +440,7 @@
 
         bool encode (wchar[] input, void[] output, inout UAdjust x, bool flush)
         {
-                Error   e;
+                UErrorCode   e;
                 wchar*  src = input.ptr;
                 void*   dst = output.ptr;
                 wchar*  srcLimit = src + input.length;
@@ -471,7 +471,7 @@
 
         uint encode (wchar[] input, void[] output)
         {
-                Error e;
+                UErrorCode e;
                 uint  len;
 
                 len = ucnv_fromUChars (handle, output.ptr, output.length, input.ptr, input.length, e);
@@ -551,7 +551,7 @@
         
         bool decode (void[] input, wchar[] output, inout UAdjust x, bool flush)
         {
-                Error   e;
+                UErrorCode   e;
                 void*   src = input.ptr;
                 wchar*  dst = output.ptr;
                 void*   srcLimit = src + input.length;
@@ -582,7 +582,7 @@
 
         uint decode (void[] input, wchar[] output)
         {
-                Error e;
+                UErrorCode e;
                 uint  len;
 
                 len = ucnv_toUChars (handle, output.ptr, output.length, input.ptr, input.length, e);
@@ -656,7 +656,7 @@
 
                 bool convert (void[] input, void[] output, inout UAdjust x, bool flush)
                 {
-                        Error   e;
+                        UErrorCode   e;
                         void*   src = input.ptr;
                         void*   dst = output.ptr;
                         void*   srcLimit = src + input.length;
@@ -695,20 +695,20 @@
         private static extern (C) 
         {
                 int    function (char*, char*) ucnv_compareNames;
-                Handle function (char*, inout Error) ucnv_open;
-                char*  function (void*, uint, inout uint, inout Error) ucnv_detectUnicodeSignature;
+                Handle function (char*, inout UErrorCode) ucnv_open;
+                char*  function (void*, uint, inout uint, inout UErrorCode) ucnv_detectUnicodeSignature;
                 void   function (Handle) ucnv_close;
                 void   function (Handle) ucnv_reset;
                 int    function (Handle) ucnv_resetToUnicode;
                 int    function (Handle) ucnv_resetFromUnicode;
                 ubyte  function (Handle) ucnv_getMaxCharSize;
                 ubyte  function (Handle) ucnv_getMinCharSize;
-                char*  function (Handle, inout Error) ucnv_getName;
-                uint   function (Handle, wchar*, uint, void*, uint, inout Error) ucnv_toUChars;
-                uint   function (Handle, void*, uint, wchar*, uint, inout Error) ucnv_fromUChars;
-                void   function (Handle, void**, void*, wchar**, wchar*, int*, ubyte, inout Error) ucnv_fromUnicode;
-                void   function (Handle, wchar**, wchar*, void**, void*, int*, ubyte, inout Error)  ucnv_toUnicode;
-                void   function (Handle, Handle, void**, void*, void**, void*, wchar*, wchar*, wchar*, wchar*, ubyte, ubyte, inout Error) ucnv_convertEx;
+                char*  function (Handle, inout UErrorCode) ucnv_getName;
+                uint   function (Handle, wchar*, uint, void*, uint, inout UErrorCode) ucnv_toUChars;
+                uint   function (Handle, void*, uint, wchar*, uint, inout UErrorCode) ucnv_fromUChars;
+                void   function (Handle, void**, void*, wchar**, wchar*, int*, ubyte, inout UErrorCode) ucnv_fromUnicode;
+                void   function (Handle, wchar**, wchar*, void**, void*, int*, ubyte, inout UErrorCode)  ucnv_toUnicode;
+                void   function (Handle, Handle, void**, void*, void**, void*, wchar*, wchar*, wchar*, wchar*, ubyte, ubyte, inout UErrorCode) ucnv_convertEx;
                 ubyte  function (Handle) ucnv_isAmbiguous;
                 char*  function (uint) ucnv_getAvailableName;
                 uint   function () ucnv_countAvailable;
--- a/dwtx/dwtxhelper/mangoicu/UDateFormat.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UDateFormat.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,12 +82,12 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UDateFormat;
+module dwtx.dwtxhelper.mangoicu.UDateFormat;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString,
-                dwtx.dwthelper.mangoicu.UCalendar,
-                dwtx.dwthelper.mangoicu.UNumberFormat;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString,
+                dwtx.dwtxhelper.mangoicu.UCalendar,
+                dwtx.dwtxhelper.mangoicu.UNumberFormat;
 
 /*******************************************************************************
 
@@ -178,9 +178,9 @@
 
         ***********************************************************************/
 
-        this (Style time, Style date, inout ULocale locale, inout UTimeZone tz, UText pattern=null)
+        this (Style time, Style date, inout ULocale locale, inout UTimeZone tz, UStringView pattern=null)
         {
-                Error  e;
+                UErrorCode  e;
                 wchar* p;
                 uint   c;
 
@@ -209,7 +209,7 @@
 
         void format (UString dst, UDate date, UFieldPos p = null)
         {
-                uint fmat (wchar* result, uint len, inout Error e)
+                uint fmat (wchar* result, uint len, inout UErrorCode e)
                 {
                         return udat_format (handle, date, result, len, p, e);
                 }
@@ -223,9 +223,9 @@
 
         ***********************************************************************/
 
-        UDate parse (UText src, uint* index=null)
+        UDate parse (UStringView src, uint* index=null)
         {
-                Error e;
+                UErrorCode e;
 
                 UDate x = udat_parse (handle, src.content.ptr, src.len, index, e); 
                 testError (e, "failed to parse date");
@@ -279,7 +279,7 @@
 
         UDate getTwoDigitYearStart ()
         {
-                Error e;
+                UErrorCode e;
 
                 UDate x = udat_get2DigitYearStart (handle, e); 
                 testError (e, "failed to get two digit year start");
@@ -295,7 +295,7 @@
 
         void setTwoDigitYearStart (UDate start)
         {
-                Error e;
+                UErrorCode e;
 
                 udat_set2DigitYearStart (handle, start, e); 
                 testError (e, "failed to set two digit year start");
@@ -309,7 +309,7 @@
 
         void getPattern (UString dst, bool localize)
         {
-                uint fmat (wchar* result, uint len, inout Error e)
+                uint fmat (wchar* result, uint len, inout UErrorCode e)
                 {
                         return udat_toPattern (handle, localize, result, len, e);
                 }
@@ -323,7 +323,7 @@
 
         ***********************************************************************/
 
-        void setPattern (UText pattern, bool localized)
+        void setPattern (UStringView pattern, bool localized)
         {
                 udat_applyPattern (handle, localized, pattern.get.ptr, pattern.length);        
         }
@@ -367,15 +367,15 @@
 
         private static extern (C) 
         {
-                Handle function (uint, uint, char*, wchar*, uint, wchar*, uint, inout Error) udat_open;
+                Handle function (uint, uint, char*, wchar*, uint, wchar*, uint, inout UErrorCode) udat_open;
                 void   function (Handle) udat_close;
-                uint   function (Handle, UDate, wchar*, uint, UFieldPos, inout Error) udat_format;
-                UDate  function (Handle, wchar*, uint, uint*, inout Error) udat_parse;
+                uint   function (Handle, UDate, wchar*, uint, UFieldPos, inout UErrorCode) udat_format;
+                UDate  function (Handle, wchar*, uint, uint*, inout UErrorCode) udat_parse;
                 void   function (Handle, Handle) udat_setCalendar;
                 void   function (Handle, Handle) udat_setNumberFormat;
-                UDate  function (Handle, inout Error) udat_get2DigitYearStart;
-                void   function (Handle, UDate, inout Error) udat_set2DigitYearStart;
-                uint   function (Handle, byte, wchar*, uint, inout Error) udat_toPattern;
+                UDate  function (Handle, inout UErrorCode) udat_get2DigitYearStart;
+                void   function (Handle, UDate, inout UErrorCode) udat_set2DigitYearStart;
+                uint   function (Handle, byte, wchar*, uint, inout UErrorCode) udat_toPattern;
                 void   function (Handle, byte, wchar*, uint) udat_applyPattern;
                 void   function (Handle, byte) udat_setLenient;
                 byte   function (Handle) udat_isLenient;
--- a/dwtx/dwtxhelper/mangoicu/UDomainName.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UDomainName.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,10 +82,10 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UDomainName;
+module dwtx.dwtxhelper.mangoicu.UDomainName;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
 /*******************************************************************************
 
@@ -117,7 +117,7 @@
 
 class UDomainName : ICU
 {       
-        private UText  text;
+        private UStringView  text;
         private Handle handle;
 
         enum    Options
@@ -133,7 +133,7 @@
         
         ***********************************************************************/
 
-        this (UText text)
+        this (UStringView text)
         {
                 this.text = text;
         }
@@ -153,7 +153,7 @@
 
         void toAscii (UString dst, Options o = Options.Strict)
         {
-                uint fmt (wchar* p, uint len, inout Error e)
+                uint fmt (wchar* p, uint len, inout UErrorCode e)
                 {
                         return uidna_toASCII (text.get.ptr, text.len, p, len, o, null, e);
                 }
@@ -176,7 +176,7 @@
 
         void toUnicode (UString dst, Options o = Options.Strict)
         {
-                uint fmt (wchar* p, uint len, inout Error e)
+                uint fmt (wchar* p, uint len, inout UErrorCode e)
                 {
                         return uidna_toUnicode (text.get.ptr, text.len, p, len, o, null, e);
                 }
@@ -207,7 +207,7 @@
 
         void IdnToAscii (UString dst, Options o = Options.Strict)
         {
-                uint fmt (wchar* p, uint len, inout Error e)
+                uint fmt (wchar* p, uint len, inout UErrorCode e)
                 {
                         return uidna_IDNToASCII (text.get.ptr, text.len, p, len, o, null, e);
                 }
@@ -234,7 +234,7 @@
 
         void IdnToUnicode (UString dst, Options o = Options.Strict)
         {
-                uint fmt (wchar* p, uint len, inout Error e)
+                uint fmt (wchar* p, uint len, inout UErrorCode e)
                 {
                         return uidna_IDNToUnicode (text.get.ptr, text.len, p, len, o, null, e);
                 }
@@ -258,7 +258,7 @@
 
         int compare (UString other, Options o = Options.Strict)
         {
-                Error e;
+                UErrorCode e;
                 int i = uidna_compare (text.get.ptr, text.len, other.get.ptr, other.len, o, e);
                 testError (e, "failed to compare IDN strings");
                 return i;
@@ -281,11 +281,11 @@
 
         private static extern (C) 
         {
-                uint    function (wchar*, uint, wchar*, uint, uint, void*, inout Error) uidna_toASCII;
-                uint    function (wchar*, uint, wchar*, uint, uint, void*, inout Error) uidna_toUnicode;
-                uint    function (wchar*, uint, wchar*, uint, uint, void*, inout Error) uidna_IDNToASCII;
-                uint    function (wchar*, uint, wchar*, uint, uint, void*, inout Error) uidna_IDNToUnicode;
-                int     function (wchar*, uint, wchar*, uint, uint, inout Error) uidna_compare;
+                uint    function (wchar*, uint, wchar*, uint, uint, void*, inout UErrorCode) uidna_toASCII;
+                uint    function (wchar*, uint, wchar*, uint, uint, void*, inout UErrorCode) uidna_toUnicode;
+                uint    function (wchar*, uint, wchar*, uint, uint, void*, inout UErrorCode) uidna_IDNToASCII;
+                uint    function (wchar*, uint, wchar*, uint, uint, void*, inout UErrorCode) uidna_IDNToUnicode;
+                int     function (wchar*, uint, wchar*, uint, uint, inout UErrorCode) uidna_compare;
         }
 
         /***********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/UEnumeration.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UEnumeration.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,9 +82,9 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UEnumeration;
+module dwtx.dwtxhelper.mangoicu.UEnumeration;
 
-private import  dwtx.dwthelper.mangoicu.ICU;
+private import  dwtx.dwtxhelper.mangoicu.ICU;
 
 /*******************************************************************************
 
@@ -135,7 +135,7 @@
 
         uint count ()
         {   
-                Error e;
+                UErrorCode e;
                 
                 uint x = uenum_count (handle, e);
                 testError (e, "enumeration out of sync");    
@@ -153,7 +153,7 @@
 
         void reset ()
         {       
-                ICU.Error e;
+                ICU.UErrorCode e;
 
                 uenum_reset (handle, e);
                 testError (e, "failed to reset enumeration");                
@@ -173,7 +173,7 @@
 
         bool next (out char[] dst)
         {       
-                ICU.Error e;
+                ICU.UErrorCode e;
                 uint      len;
 
                 char* p = uenum_next (handle, &len, e);
@@ -197,7 +197,7 @@
 
         bool next (inout wchar[] dst)
         {       
-                ICU.Error e;
+                ICU.UErrorCode e;
                 uint      len;
 
                 wchar* p = uenum_unext (handle, &len, e);
@@ -225,10 +225,10 @@
         private static extern (C) 
         {
                 void   function (Handle) uenum_close;
-                uint   function (Handle, inout Error) uenum_count;
-                void   function (Handle, inout Error) uenum_reset;
-                char*  function (Handle, uint*, inout Error) uenum_next;
-                wchar* function (Handle, uint*, inout Error) uenum_unext;
+                uint   function (Handle, inout UErrorCode) uenum_count;
+                void   function (Handle, inout UErrorCode) uenum_reset;
+                char*  function (Handle, uint*, inout UErrorCode) uenum_next;
+                wchar* function (Handle, uint*, inout UErrorCode) uenum_unext;
         }
 
         /***********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/ULocale.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/ULocale.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,9 +82,9 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.ULocale;
+module dwtx.dwtxhelper.mangoicu.ULocale;
 
-private import dwtx.dwthelper.mangoicu.ICU;
+private import dwtx.dwtxhelper.mangoicu.ICU;
 
 /*******************************************************************************
 
@@ -169,7 +169,7 @@
         
         static void setDefault (inout ULocale locale)
         {
-                ICU.Error e;
+                ICU.UErrorCode e;
                 
                 uloc_setDefault (ICU.toString(locale.name), e);
                 
@@ -196,7 +196,7 @@
         private static extern (C) 
         {
                 char* function () uloc_getDefault;
-                void  function (char*, inout ICU.Error) uloc_setDefault;
+                void  function (char*, inout ICU.UErrorCode) uloc_setDefault;
         }
 
         /**********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/UMessageFormat.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UMessageFormat.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,12 +82,12 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UMessageFormat;
+module dwtx.dwtxhelper.mangoicu.UMessageFormat;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
-public  import  dwtx.dwthelper.mangoicu.ULocale;
+public  import  dwtx.dwtxhelper.mangoicu.ULocale;
 
 /*******************************************************************************
 
@@ -114,7 +114,7 @@
 
         this (wchar[] pattern, inout ULocale locale = ULocale.Default)
         {       
-                Error e;
+                UErrorCode e;
 
                 handle = umsg_open (pattern.ptr, pattern.length, toString(locale.name), null, e);
                 testError (e, "failed to open message formatter");
@@ -127,7 +127,7 @@
 
         ***********************************************************************/
 
-        this (UText pattern, inout ULocale locale = ULocale.Default)
+        this (UStringView pattern, inout ULocale locale = ULocale.Default)
         {
                 this (pattern.get, locale);
         }
@@ -175,9 +175,9 @@
 
         ***********************************************************************/
 
-        UMessageFormat setPattern (UText pattern)
+        UMessageFormat setPattern (UStringView pattern)
         {
-                Error e;
+                UErrorCode e;
 
                 umsg_applyPattern (handle, pattern.get.ptr, pattern.len, null, e);
                 testError (e, "failed to set formatter pattern");
@@ -192,7 +192,7 @@
 
         UMessageFormat getPattern (UString s)
         {
-                uint fmt (wchar* dst, uint length, inout Error e)
+                uint fmt (wchar* dst, uint length, inout UErrorCode e)
                 {
                         return umsg_toPattern (handle, dst, length, e);
                 }
@@ -212,7 +212,7 @@
 
         UMessageFormat format (UString s, Args* list)
         {
-                uint fmt (wchar* dst, uint length, inout Error e)
+                uint fmt (wchar* dst, uint length, inout UErrorCode e)
                 {
                         return umsg_vformat (handle, dst, length, list.args.ptr, e);
                 }
@@ -274,7 +274,7 @@
 
                 ***************************************************************/
 
-                Args* add (UText x)
+                Args* add (UStringView x)
                 {
                         args[index] = cast(uint) cast(wchar*) x.get();
                         ++index;
@@ -332,13 +332,13 @@
 
         private static extern (C) 
         {
-                Handle  function (wchar*, uint, char*, void*, inout Error) umsg_open;
+                Handle  function (wchar*, uint, char*, void*, inout UErrorCode) umsg_open;
                 void    function (Handle) umsg_close;
                 void    function (Handle, char*) umsg_setLocale;
                 char*   function (Handle) umsg_getLocale;
-                uint    function (Handle, wchar*, uint, inout Error) umsg_toPattern;
-                void    function (Handle, wchar*, uint, void*, inout Error) umsg_applyPattern;
-                uint    function (Handle, wchar*, uint, void*, inout Error) umsg_vformat;
+                uint    function (Handle, wchar*, uint, inout UErrorCode) umsg_toPattern;
+                void    function (Handle, wchar*, uint, void*, inout UErrorCode) umsg_applyPattern;
+                uint    function (Handle, wchar*, uint, void*, inout UErrorCode) umsg_vformat;
         }
 
         /***********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/UNormalize.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UNormalize.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,11 +82,11 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UNormalize;
+module dwtx.dwtxhelper.mangoicu.UNormalize;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString,
-                dwtx.dwthelper.mangoicu.ULocale;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString,
+                dwtx.dwtxhelper.mangoicu.ULocale;
 
 /*******************************************************************************
 
@@ -220,9 +220,9 @@
 
         ***********************************************************************/
 
-        static void normalize (UText src, UString dst, Mode mode, Options o = Options.None)
+        static void normalize (UStringView src, UString dst, Mode mode, Options o = Options.None)
         {
-                uint fmt (wchar* dst, uint len, inout Error e)
+                uint fmt (wchar* dst, uint len, inout UErrorCode e)
                 {
                         return unorm_normalize (src.get.ptr, src.len, mode, o, dst, len, e);
                 }
@@ -245,9 +245,9 @@
 
         ***********************************************************************/
 
-        static Check check (UText t, Mode mode, Options o = Options.None)
+        static Check check (UStringView t, Mode mode, Options o = Options.None)
         {      
-                Error e; 
+                UErrorCode e; 
 
                 Check c = cast(Check) unorm_quickCheckWithOptions (t.get.ptr, t.len, mode, o, e);
                 testError (e, "failed to perform normalization check");
@@ -266,9 +266,9 @@
 
         ***********************************************************************/
 
-        static bool isNormalized (UText t, Mode mode, Options o = Options.None)
+        static bool isNormalized (UStringView t, Mode mode, Options o = Options.None)
         {      
-                Error e; 
+                UErrorCode e; 
 
                 byte b = unorm_isNormalizedWithOptions (t.get.ptr, t.len, mode, o, e);
                 testError (e, "failed to perform normalization test");
@@ -295,9 +295,9 @@
 
         ***********************************************************************/
 
-        static void concatenate (UText left, UText right, UString dst, Mode mode, Options o = Options.None)
+        static void concatenate (UStringView left, UStringView right, UString dst, Mode mode, Options o = Options.None)
         {      
-                uint fmt (wchar* p, uint len, inout Error e)
+                uint fmt (wchar* p, uint len, inout UErrorCode e)
                 {
                         return unorm_concatenate (left.get.ptr, left.len, right.get.ptr, right.len, p, len, mode, o, e);
                 }
@@ -325,9 +325,9 @@
 
         ***********************************************************************/
 
-        static int compare (UText left, UText right, Options o = Options.None)
+        static int compare (UStringView left, UStringView right, Options o = Options.None)
         {      
-                Error e; 
+                UErrorCode e; 
 
                 int i = unorm_compare (left.get.ptr, left.len, right.get.ptr, right.len, o, e);
                 testError (e, "failed to compare");
@@ -351,11 +351,11 @@
 
         private static extern (C) 
         {
-                uint  function (wchar*, uint, uint, uint, wchar*, uint, inout Error) unorm_normalize;
-                uint  function (wchar*, uint, uint, uint, inout Error) unorm_quickCheckWithOptions;
-                byte  function (wchar*, uint, uint, uint, inout Error) unorm_isNormalizedWithOptions;
-                uint  function (wchar*, uint, wchar*, uint, wchar*, uint, uint, uint, inout Error) unorm_concatenate;
-                uint  function (wchar*, uint, wchar*, uint, uint, inout Error) unorm_compare;
+                uint  function (wchar*, uint, uint, uint, wchar*, uint, inout UErrorCode) unorm_normalize;
+                uint  function (wchar*, uint, uint, uint, inout UErrorCode) unorm_quickCheckWithOptions;
+                byte  function (wchar*, uint, uint, uint, inout UErrorCode) unorm_isNormalizedWithOptions;
+                uint  function (wchar*, uint, wchar*, uint, wchar*, uint, uint, uint, inout UErrorCode) unorm_concatenate;
+                uint  function (wchar*, uint, wchar*, uint, uint, inout UErrorCode) unorm_compare;
         }
 
         /***********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/UNumberFormat.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UNumberFormat.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,12 +82,12 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UNumberFormat;
+module dwtx.dwtxhelper.mangoicu.UNumberFormat;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
-public  import dwtx.dwthelper.mangoicu.ULocale;
+public  import dwtx.dwtxhelper.mangoicu.ULocale;
 
 /*******************************************************************************
 
@@ -110,9 +110,9 @@
 
         ***********************************************************************/
 
-        void setPattern (UText pattern, bool localized)
+        void setPattern (UStringView pattern, bool localized)
         {
-                Error e;
+                UErrorCode e;
 
                 unum_applyPattern (handle, localized, pattern.get.ptr, pattern.length, null, e);        
                 testError (e, "failed to set numeric pattern");
@@ -648,7 +648,7 @@
 
         void getPattern (UString dst, bool localize)
         {
-                uint fmat (wchar* result, uint len, inout Error e)
+                uint fmat (wchar* result, uint len, inout UErrorCode e)
                 {
                         return unum_toPattern (handle, localize, result, len, e);
                 }
@@ -770,7 +770,7 @@
 
         this (Style style, char[] pattern, inout ULocale locale)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = unum_open (style, pattern.ptr, pattern.length, toString(locale.name), null, e);
                 testError (e, "failed to create NumberFormat");
@@ -791,7 +791,7 @@
 
         void format (UString dst, int number, UFieldPos p = null)
         {
-                uint fmat (wchar* result, uint len, inout Error e)
+                uint fmat (wchar* result, uint len, inout UErrorCode e)
                 {
                         return unum_format (handle, number, result, len, p, e);
                 }
@@ -805,7 +805,7 @@
 
         void format (UString dst, long number, UFieldPos p = null)
         {
-                uint fmat (wchar* result, uint len, inout Error e)
+                uint fmat (wchar* result, uint len, inout UErrorCode e)
                 {
                         return unum_formatInt64 (handle, number, result, len, p, e);
                 }
@@ -819,7 +819,7 @@
 
         void format (UString dst, double number, UFieldPos p = null)
         {
-                uint fmat (wchar* result, uint len, inout Error e)
+                uint fmat (wchar* result, uint len, inout UErrorCode e)
                 {
                         return unum_formatDouble (handle, number, result, len, p, e);
                 }
@@ -831,9 +831,9 @@
         
         ***********************************************************************/
 
-        int parseInteger (UText src, uint* index=null)
+        int parseInteger (UStringView src, uint* index=null)
         {
-                Error e;
+                UErrorCode e;
 
                 return unum_parse (handle, src.content.ptr, src.len, index, e); 
         }
@@ -842,9 +842,9 @@
         
         ***********************************************************************/
 
-        long parseLong (UText src, uint* index=null)
+        long parseLong (UStringView src, uint* index=null)
         {
-                Error e;
+                UErrorCode e;
 
                 return unum_parseInt64 (handle, src.content.ptr, src.len, index, e); 
         }
@@ -853,9 +853,9 @@
         
         ***********************************************************************/
 
-        double parseDouble (UText src, uint* index=null)
+        double parseDouble (UStringView src, uint* index=null)
         {
-                Error e;
+                UErrorCode e;
 
                 return unum_parseDouble (handle, src.content.ptr, src.len, index, e); 
         }
@@ -878,18 +878,18 @@
 
         private static extern (C) 
         {
-                Handle function (uint, char*, uint, char*, ParseError, inout Error) unum_open;
+                Handle function (uint, char*, uint, char*, ParseError, inout UErrorCode) unum_open;
                 void   function (Handle) unum_close;
-                int    function (Handle, int,    wchar*, uint, UFieldPos, inout Error) unum_format;
-                int    function (Handle, long,   wchar*, uint, UFieldPos, inout Error) unum_formatInt64;
-                int    function (Handle, double, wchar*, uint, UFieldPos, inout Error) unum_formatDouble;
-                int    function (Handle, wchar*, uint, uint*, inout Error) unum_parse;
-                long   function (Handle, wchar*, uint, uint*, inout Error) unum_parseInt64;
-                double function (Handle, wchar*, uint, uint*, inout Error) unum_parseDouble;
+                int    function (Handle, int,    wchar*, uint, UFieldPos, inout UErrorCode) unum_format;
+                int    function (Handle, long,   wchar*, uint, UFieldPos, inout UErrorCode) unum_formatInt64;
+                int    function (Handle, double, wchar*, uint, UFieldPos, inout UErrorCode) unum_formatDouble;
+                int    function (Handle, wchar*, uint, uint*, inout UErrorCode) unum_parse;
+                long   function (Handle, wchar*, uint, uint*, inout UErrorCode) unum_parseInt64;
+                double function (Handle, wchar*, uint, uint*, inout UErrorCode) unum_parseDouble;
                 int    function (Handle, uint) unum_getAttribute;
                 void   function (Handle, uint, uint) unum_setAttribute;
-                uint   function (Handle, byte, wchar*, uint, inout Error) unum_toPattern;
-                void   function (Handle, byte, wchar*, uint, ParseError, inout Error) unum_applyPattern;
+                uint   function (Handle, byte, wchar*, uint, inout UErrorCode) unum_toPattern;
+                void   function (Handle, byte, wchar*, uint, ParseError, inout UErrorCode) unum_applyPattern;
         }
 
         /***********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/URegex.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/URegex.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,14 +82,14 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.URegex;
+module dwtx.dwtxhelper.mangoicu.URegex;
 
-private import  dwtx.dwthelper.mangoicu.ICU;
+private import  dwtx.dwtxhelper.mangoicu.ICU;
 
-public  import  dwtx.dwthelper.mangoicu.ULocale,
-                dwtx.dwthelper.mangoicu.UString,
-                dwtx.dwthelper.mangoicu.UCollator,
-                dwtx.dwthelper.mangoicu.UBreakIterator;
+public  import  dwtx.dwtxhelper.mangoicu.ULocale,
+                dwtx.dwtxhelper.mangoicu.UString,
+                dwtx.dwtxhelper.mangoicu.UCollator,
+                dwtx.dwtxhelper.mangoicu.UBreakIterator;
 
 
 /*******************************************************************************
@@ -125,7 +125,7 @@
 class URegex : Groups
 {       
         private Handle  handle;
-        private UText   theText;
+        private UStringView   theText;
 
         // Regex modes 
         public enum     Flag 
@@ -168,7 +168,7 @@
 
         this (wchar[] pattern, Flag flags=Flag.None, ParseError* pe=null)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = uregex_open (pattern.ptr, pattern.length, flags, pe, e);
                 testError (e, "failed to open regex");
@@ -184,7 +184,7 @@
 
         ***********************************************************************/
 
-        this (UText pattern, Flag flags=Flag.None, ParseError* pe=null)
+        this (UStringView pattern, Flag flags=Flag.None, ParseError* pe=null)
         {
                 this (pattern.get, flags, pe);
         }
@@ -197,7 +197,7 @@
 
         private this (Handle handle)
         {
-                Error e;
+                UErrorCode e;
 
                 this.handle = handle;
                 uregex_setText (handle, "", 0, e);
@@ -234,7 +234,7 @@
 
         URegex clone ()
         {       
-                Error e;
+                UErrorCode e;
 
                 Handle h = uregex_clone (handle, e);
                 testError (e, "failed to clone regex");
@@ -250,7 +250,7 @@
 
         UString getPattern ()
         {       
-                Error e;
+                UErrorCode e;
                 uint  len;
 
                 wchar* x = uregex_pattern (handle, len, e);
@@ -267,7 +267,7 @@
 
         Flag getFlags ()
         {       
-                Error e;
+                UErrorCode e;
 
                 Flag f = cast(Flag) uregex_flags (handle, e);
                 testError (e, "failed to get regex flags");
@@ -293,9 +293,9 @@
 
         ***********************************************************************/
 
-        void setText (UText t)
+        void setText (UStringView t)
         {       
-                Error e;
+                UErrorCode e;
 
                 theText = t;
                 uregex_setText (handle, t.get.ptr, t.length, e);
@@ -312,7 +312,7 @@
 
         ***********************************************************************/
 
-        UText getText ()
+        UStringView getText ()
         {      
                 return theText;
         }
@@ -360,7 +360,7 @@
 
         void group (UString s, uint index)
         {       
-                uint fmt (wchar* dst, uint length, inout Error e)
+                uint fmt (wchar* dst, uint length, inout UErrorCode e)
                 {
                         return uregex_group (handle, index, dst, length, e);
                 }
@@ -377,7 +377,7 @@
 
         uint groupCount ()
         {       
-                Error e;
+                UErrorCode e;
 
                 uint i = uregex_groupCount (handle, e);
                 testError (e, "failed to get regex group-count");
@@ -399,7 +399,7 @@
 
         uint start (uint index = 0)
         {       
-                Error e;
+                UErrorCode e;
 
                 uint i = uregex_start (handle, index, e);
                 testError (e, "failed to get regex start");
@@ -421,7 +421,7 @@
 
         uint end (uint index = 0)
         {       
-                Error e;
+                UErrorCode e;
 
                 uint i = uregex_end (handle, index, e);
                 testError (e, "failed to get regex end");
@@ -441,7 +441,7 @@
 
         void reset (uint startIndex)
         {       
-                Error e;
+                UErrorCode e;
 
                 uregex_reset (handle, startIndex, e);
                 testError (e, "failed to set regex next-index");
@@ -459,7 +459,7 @@
 
         bool match (uint startIndex)
         {       
-                Error e;
+                UErrorCode e;
 
                 bool b = uregex_matches (handle, startIndex, e);
                 testError (e, "failed while matching regex");
@@ -478,7 +478,7 @@
 
         bool probe (uint startIndex)
         {       
-                Error e;
+                UErrorCode e;
 
                 bool b = uregex_lookingAt (handle, startIndex, e);
                 testError (e, "failed while looking at regex");
@@ -497,7 +497,7 @@
 
         bool next (uint startIndex = uint.max)
         {     
-                Error e;
+                UErrorCode e;
                 bool  b;
 
                 b = (startIndex == uint.max) ? uregex_findNext (handle, e) : 
@@ -535,9 +535,9 @@
                 
         ***********************************************************************/
 
-        uint replaceAll (UText replace, UString result)
+        uint replaceAll (UStringView replace, UString result)
         {
-                Error e;
+                UErrorCode e;
 
                 uint len = uregex_replaceAll (handle, replace.get.ptr, replace.length, result.get.ptr, result.length, e);
                 testError (e, "failed during regex replace");  
@@ -573,9 +573,9 @@
                 
         ***********************************************************************/
 
-        uint replaceFirst (UText replace, UString result)
+        uint replaceFirst (UStringView replace, UString result)
         {
-                Error e;
+                UErrorCode e;
 
                 uint len = uregex_replaceFirst (handle, replace.get.ptr, replace.length, result.get.ptr, result.length, e);
                 testError (e, "failed during regex replace");  
@@ -594,7 +594,7 @@
 
         uint split (wchar[][] fields)
         {     
-                Error           e;
+                UErrorCode           e;
                 uint            pos,
                                 count;
                 wchar[]         content = theText.get;
@@ -634,24 +634,24 @@
 
         private static extern (C) 
         {
-                Handle  function (wchar*, uint, uint, ParseError*, inout Error) uregex_open;
+                Handle  function (wchar*, uint, uint, ParseError*, inout UErrorCode) uregex_open;
                 void    function (Handle) uregex_close;
-                Handle  function (Handle, inout Error) uregex_clone;
-                wchar*  function (Handle, inout uint, inout Error) uregex_pattern;
-                uint    function (Handle, inout Error) uregex_flags;
-                void    function (Handle, wchar*, uint, inout Error) uregex_setText;
-                wchar*  function (Handle, inout uint, inout Error) uregex_getText;
-                uint    function (Handle, uint, wchar*, uint, inout Error) uregex_group;
-                uint    function (Handle, inout Error) uregex_groupCount;
-                uint    function (Handle, uint, inout Error) uregex_start;
-                uint    function (Handle, uint, inout Error) uregex_end;
-                void    function (Handle, uint, inout Error) uregex_reset;
-                bool    function (Handle, uint, inout Error) uregex_matches;
-                bool    function (Handle, uint, inout Error) uregex_lookingAt;
-                bool    function (Handle, uint, inout Error) uregex_find;
-                bool    function (Handle, inout Error) uregex_findNext;
-                uint    function (Handle, wchar*, uint, wchar*, uint, inout Error) uregex_replaceAll;
-                uint    function (Handle, wchar*, uint, wchar*, uint, inout Error) uregex_replaceFirst;
+                Handle  function (Handle, inout UErrorCode) uregex_clone;
+                wchar*  function (Handle, inout uint, inout UErrorCode) uregex_pattern;
+                uint    function (Handle, inout UErrorCode) uregex_flags;
+                void    function (Handle, wchar*, uint, inout UErrorCode) uregex_setText;
+                wchar*  function (Handle, inout uint, inout UErrorCode) uregex_getText;
+                uint    function (Handle, uint, wchar*, uint, inout UErrorCode) uregex_group;
+                uint    function (Handle, inout UErrorCode) uregex_groupCount;
+                uint    function (Handle, uint, inout UErrorCode) uregex_start;
+                uint    function (Handle, uint, inout UErrorCode) uregex_end;
+                void    function (Handle, uint, inout UErrorCode) uregex_reset;
+                bool    function (Handle, uint, inout UErrorCode) uregex_matches;
+                bool    function (Handle, uint, inout UErrorCode) uregex_lookingAt;
+                bool    function (Handle, uint, inout UErrorCode) uregex_find;
+                bool    function (Handle, inout UErrorCode) uregex_findNext;
+                uint    function (Handle, wchar*, uint, wchar*, uint, inout UErrorCode) uregex_replaceAll;
+                uint    function (Handle, wchar*, uint, wchar*, uint, inout UErrorCode) uregex_replaceFirst;
         }
 
         /***********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/UResourceBundle.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UResourceBundle.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,12 +82,12 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UResourceBundle;
+module dwtx.dwtxhelper.mangoicu.UResourceBundle;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
-public  import  dwtx.dwthelper.mangoicu.ULocale;
+public  import  dwtx.dwtxhelper.mangoicu.ULocale;
 
 /*******************************************************************************
 
@@ -170,7 +170,7 @@
 
         this (inout ULocale locale, char[] path = null)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = ures_open (toString(path), toString(locale.name), e);
                 testError (e, "failed to open resource bundle");
@@ -207,7 +207,7 @@
 
         int getInt ()
         {
-                Error e;
+                UErrorCode e;
 
                 int x = ures_getInt (handle, e);
                 testError (e, "failed to get resource integer");
@@ -220,14 +220,14 @@
 
         ***********************************************************************/
 
-        UText getString ()
+        UStringView getString ()
         {
-                Error e;
+                UErrorCode e;
                 uint  len;
 
                 wchar* x = ures_getString (handle, len, e);
                 testError (e, "failed to get resource string");
-                return new UText (x[0..len]);
+                return new UStringView (x[0..len]);
         }
 
         /***********************************************************************
@@ -237,14 +237,14 @@
 
         ***********************************************************************/
 
-        UText getString (uint index)
+        UStringView getString (uint index)
         {
-                Error e;
+                UErrorCode e;
                 uint  len;
 
                 wchar* x = ures_getStringByIndex (handle, index, len, e);
                 testError (e, "failed to get resource string");
-                return new UText (x[0..len]);
+                return new UStringView (x[0..len]);
         }
 
         /***********************************************************************
@@ -254,14 +254,14 @@
 
         ***********************************************************************/
 
-        UText getString (char[] key)
+        UStringView getString (char[] key)
         {
-                Error e;
+                UErrorCode e;
                 uint  len;
 
                 wchar* x = ures_getStringByKey (handle, toString(key), len, e);
                 testError (e, "failed to get resource string");
-                return new UText (x[0..len]);
+                return new UStringView (x[0..len]);
         }
 
         /***********************************************************************
@@ -271,15 +271,15 @@
 
         ***********************************************************************/
 
-        UText getNextString ()
+        UStringView getNextString ()
         {
-                Error   e;
+                UErrorCode   e;
                 uint    len;
                 char*   key; 
 
                 wchar* x = ures_getNextString (handle, len, key, e);
                 testError (e, "failed to get next resource string");
-                return new UText (x[0..len]);
+                return new UStringView (x[0..len]);
         }
 
         /***********************************************************************
@@ -291,7 +291,7 @@
 
         void[] getBinary ()
         {
-                Error e;
+                UErrorCode e;
                 uint  len;
 
                 void* x = ures_getBinary (handle, len, e);
@@ -307,7 +307,7 @@
 
         int[] getIntVector ()
         {
-                Error e;
+                UErrorCode e;
                 uint  len;
 
                 int* x = ures_getIntVector (handle, len, e);
@@ -348,7 +348,7 @@
 
         UResourceBundle getNextResource ()
         {
-                Error e;
+                UErrorCode e;
 
                 return get (ures_getNextResource (handle, null, e), e);
         }
@@ -362,7 +362,7 @@
 
         UResourceBundle getResource (char[] key)
         {
-                Error e;
+                UErrorCode e;
 
                 return get (ures_getByKey (handle, toString(key), null, e), e);
         }
@@ -375,7 +375,7 @@
 
         UResourceBundle getResource (uint index)
         {
-                Error e;
+                UErrorCode e;
 
                 return get (ures_getByIndex (handle, index, null, e), e);
         }
@@ -400,7 +400,7 @@
 
         void getLocale (inout ULocale locale)
         {
-                Error e;
+                UErrorCode e;
 
                 locale.name = toArray (ures_getLocale (handle, e));
                 testError (e, "failed to get resource locale");
@@ -438,7 +438,7 @@
 
         ***********************************************************************/
 
-        private static final UResourceBundle get (Handle handle, inout Error e)
+        private static final UResourceBundle get (Handle handle, inout UErrorCode e)
         {
                 testError (e, "failed to create resource bundle");
                 if (handle)
@@ -463,25 +463,25 @@
 
         private static extern (C) 
         {
-                Handle  function (char*, char*, inout Error) ures_open;
+                Handle  function (char*, char*, inout UErrorCode) ures_open;
                 void    function (Handle) ures_close;
-                char*   function (Handle, inout Error) ures_getLocale;
+                char*   function (Handle, inout UErrorCode) ures_getLocale;
                 void    function (Handle, inout Version) ures_getVersion;
                 uint    function (Handle) ures_getSize;
-                int     function (Handle, inout Error) ures_getInt;
-                wchar*  function (Handle, inout uint, inout Error) ures_getString;
-                wchar*  function (Handle, uint, inout uint, inout Error) ures_getStringByIndex;
-                wchar*  function (Handle, char*, inout uint, inout Error) ures_getStringByKey;
-                void*   function (Handle, inout uint, inout Error) ures_getBinary;
-                int*    function (Handle, inout uint, inout Error) ures_getIntVector;
+                int     function (Handle, inout UErrorCode) ures_getInt;
+                wchar*  function (Handle, inout uint, inout UErrorCode) ures_getString;
+                wchar*  function (Handle, uint, inout uint, inout UErrorCode) ures_getStringByIndex;
+                wchar*  function (Handle, char*, inout uint, inout UErrorCode) ures_getStringByKey;
+                void*   function (Handle, inout uint, inout UErrorCode) ures_getBinary;
+                int*    function (Handle, inout uint, inout UErrorCode) ures_getIntVector;
                 byte    function (Handle) ures_hasNext;
                 void    function (Handle) ures_resetIterator;
-                wchar*  function (Handle, inout uint, inout char*, inout Error) ures_getNextString;
+                wchar*  function (Handle, inout uint, inout char*, inout UErrorCode) ures_getNextString;
                 char*   function (Handle) ures_getKey;
                 int     function (Handle) ures_getType;
-                Handle  function (Handle, Handle, inout Error) ures_getNextResource;
-                Handle  function (Handle, uint, Handle, inout Error) ures_getByIndex;
-                Handle  function (Handle, char*, Handle, inout Error) ures_getByKey;
+                Handle  function (Handle, Handle, inout UErrorCode) ures_getNextResource;
+                Handle  function (Handle, uint, Handle, inout UErrorCode) ures_getByIndex;
+                Handle  function (Handle, char*, Handle, inout UErrorCode) ures_getByKey;
         }
 
         /***********************************************************************
@@ -536,7 +536,7 @@
         static void test()
         {
                 UResourceBundle b = new UResourceBundle (ULocale.Default);
-                UText t = b.getNextString();
+                UStringView t = b.getNextString();
                 UResourceBundle b1 = b.getNextResource ();
         }
 }
--- a/dwtx/dwtxhelper/mangoicu/USearch.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/USearch.d	Mon Jul 07 15:53:07 2008 +0200
@@ -1,23 +1,23 @@
 /*******************************************************************************
 
         @file USearch.d
-        
+
         Copyright (c) 2004 Kris Bell
-        
+
         This software is provided 'as-is', without any express or implied
         warranty. In no event will the authors be held liable for damages
         of any kind arising from the use of this software.
-        
-        Permission is hereby granted to anyone to use this software for any 
-        purpose, including commercial applications, and to alter it and/or 
+
+        Permission is hereby granted to anyone to use this software for any
+        purpose, including commercial applications, and to alter it and/or
         redistribute it freely, subject to the following restrictions:
-        
-        1. The origin of this software must not be misrepresented; you must 
-           not claim that you wrote the original software. If you use this 
-           software in a product, an acknowledgment within documentation of 
+
+        1. The origin of this software must not be misrepresented; you must
+           not claim that you wrote the original software. If you use this
+           software in a product, an acknowledgment within documentation of
            said product would be appreciated but is not required.
 
-        2. Altered source versions must be plainly marked as such, and must 
+        2. Altered source versions must be plainly marked as such, and must
            not be misrepresented as being the original software.
 
         3. This notice may not be removed or altered from any distribution
@@ -30,11 +30,11 @@
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
-        @version        Initial version, November 2004      
+        @version        Initial version, November 2004
         @author         Kris
 
-        Note that this package and documentation is built around the ICU 
-        project (http://oss.software.ibm.com/icu/). Below is the license 
+        Note that this package and documentation is built around the ICU
+        project (http://oss.software.ibm.com/icu/). Below is the license
         statement as specified by that software:
 
 
@@ -45,7 +45,7 @@
 
         COPYRIGHT AND PERMISSION NOTICE
 
-        Copyright (c) 1995-2003 International Business Machines Corporation and 
+        Copyright (c) 1995-2003 International Business Machines Corporation and
         others.
 
         All rights reserved.
@@ -77,161 +77,161 @@
 
         ----------------------------------------------------------------------
 
-        All trademarks and registered trademarks mentioned herein are the 
+        All trademarks and registered trademarks mentioned herein are the
         property of their respective owners.
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.USearch;
+module dwtx.dwtxhelper.mangoicu.USearch;
 
-private import  dwtx.dwthelper.mangoicu.ICU;
+private import  dwtx.dwtxhelper.mangoicu.ICU;
 
-public  import  dwtx.dwthelper.mangoicu.ULocale,
-                dwtx.dwthelper.mangoicu.UString,
-                dwtx.dwthelper.mangoicu.UCollator,
-                dwtx.dwthelper.mangoicu.UBreakIterator;
+public  import  dwtx.dwtxhelper.mangoicu.ULocale,
+                dwtx.dwtxhelper.mangoicu.UString,
+                dwtx.dwtxhelper.mangoicu.UCollator,
+                dwtx.dwtxhelper.mangoicu.UBreakIterator;
 
 /*******************************************************************************
 
-        Apis for an engine that provides language-sensitive text 
-        searching based on the comparison rules defined in a UCollator 
-        data struct. This ensures that language eccentricity can be handled, 
-        e.g. for the German collator, characters &#x00DF; and SS will be matched 
-        if case is chosen to be ignored. See the "ICU Collation Design 
+        Apis for an engine that provides language-sensitive text
+        searching based on the comparison rules defined in a UCollator
+        data struct. This ensures that language eccentricity can be handled,
+        e.g. for the German collator, characters &#x00DF; and SS will be matched
+        if case is chosen to be ignored. See the "ICU Collation Design
         Document" for more information.
 
-        The algorithm implemented is a modified form of the Boyer Moore's 
-        search. For more information see "Efficient Text Searching in Java", 
-        published in Java Report in February, 1999, for further information 
+        The algorithm implemented is a modified form of the Boyer Moore's
+        search. For more information see "Efficient Text Searching in Java",
+        published in Java Report in February, 1999, for further information
         on the algorithm.
 
-        There are 2 match options for selection: Let S' be the sub-string 
-        of a text string S between the offsets start and end <start, end>. A 
+        There are 2 match options for selection: Let S' be the sub-string
+        of a text string S between the offsets start and end <start, end>. A
         pattern string P matches a text string S at the offsets <start, end> if
- 
+
         - option 1. Some canonical equivalent of P matches some canonical
                     equivalent of S'
 
-        - option 2. P matches S' and if P starts or ends with a combining 
-                    mark, there exists no non-ignorable combining mark before 
-                    or after S' in S respectively. 
- 
+        - option 2. P matches S' and if P starts or ends with a combining
+                    mark, there exists no non-ignorable combining mark before
+                    or after S' in S respectively.
+
         Option 2 will be the default
 
-        This search has APIs similar to that of other text iteration 
-        mechanisms such as the break iterators in ubrk.h. Using these 
-        APIs, it is easy to scan through text looking for all occurances 
-        of a given pattern. This search iterator allows changing of 
-        direction by calling a reset followed by a next or previous. 
-        Though a direction change can occur without calling reset first, 
-        this operation comes with some speed penalty. Generally, match 
-        results in the forward direction will match the result matches 
+        This search has APIs similar to that of other text iteration
+        mechanisms such as the break iterators in ubrk.h. Using these
+        APIs, it is easy to scan through text looking for all occurances
+        of a given pattern. This search iterator allows changing of
+        direction by calling a reset followed by a next or previous.
+        Though a direction change can occur without calling reset first,
+        this operation comes with some speed penalty. Generally, match
+        results in the forward direction will match the result matches
         in the backwards direction in the reverse order
 
-        USearch provides APIs to specify the starting position within 
-        the text string to be searched, e.g. setOffset(), previous(x) 
-        and next(x). Since the starting position will be set as it 
-        is specified, please take note that there are some dangerous 
+        USearch provides APIs to specify the starting position within
+        the text string to be searched, e.g. setOffset(), previous(x)
+        and next(x). Since the starting position will be set as it
+        is specified, please take note that there are some dangerous
         positions which the search may render incorrect results:
 
         - The midst of a substring that requires normalization.
 
-        - If the following match is to be found, the position should 
-          not be the second character which requires to be swapped 
-          with the preceding character. Vice versa, if the preceding 
-          match is to be found, position to search from should not be 
-          the first character which requires to be swapped with the 
-          next character. E.g certain Thai and Lao characters require 
+        - If the following match is to be found, the position should
+          not be the second character which requires to be swapped
+          with the preceding character. Vice versa, if the preceding
+          match is to be found, position to search from should not be
+          the first character which requires to be swapped with the
+          next character. E.g certain Thai and Lao characters require
           swapping.
 
-        - If a following pattern match is to be found, any position 
-          within a contracting sequence except the first will fail. 
-          Vice versa if a preceding pattern match is to be found, 
-          a invalid starting point would be any character within a 
+        - If a following pattern match is to be found, any position
+          within a contracting sequence except the first will fail.
+          Vice versa if a preceding pattern match is to be found,
+          a invalid starting point would be any character within a
           contracting sequence except the last.
 
-        A breakiterator can be used if only matches at logical breaks are 
-        desired. Using a breakiterator will only give you results that 
-        exactly matches the boundaries given by the breakiterator. For 
-        instance the pattern "e" will not be found in the string "\u00e9" 
+        A breakiterator can be used if only matches at logical breaks are
+        desired. Using a breakiterator will only give you results that
+        exactly matches the boundaries given by the breakiterator. For
+        instance the pattern "e" will not be found in the string "\u00e9"
         if a character break iterator is used.
 
-        Options are provided to handle overlapping matches. E.g. In 
-        English, overlapping matches produces the result 0 and 2 for 
-        the pattern "abab" in the text "ababab", where else mutually 
+        Options are provided to handle overlapping matches. E.g. In
+        English, overlapping matches produces the result 0 and 2 for
+        the pattern "abab" in the text "ababab", where else mutually
         exclusive matches only produce the result of 0.
 
-        Though collator attributes will be taken into consideration while 
-        performing matches, there are no APIs here for setting and getting 
-        the attributes. These attributes can be set by getting the collator 
-        from getCollator() and using the APIs in UCollator. Lastly to update 
+        Though collator attributes will be taken into consideration while
+        performing matches, there are no APIs here for setting and getting
+        the attributes. These attributes can be set by getting the collator
+        from getCollator() and using the APIs in UCollator. Lastly to update
         String Search to the new collator attributes, reset() has to be called.
 
-        See http://oss.software.ibm.com/icu/apiref/usearch_8h.html for full 
+        See http://oss.software.ibm.com/icu/apiref/usearch_8h.html for full
         details.
 
 *******************************************************************************/
 
 class USearch : ICU
-{       
+{
         private Handle          handle;
-        private UBreakIterator  iterator;
+        private UBreakIterator* iterator;
 
-        // DONE is returned by previous() and next() after all valid 
-        // matches have been returned, and by first() and last() if 
+        // DONE is returned by previous() and next() after all valid
+        // matches have been returned, and by first() and last() if
         // there are no matches at all.
         const uint      Done = uint.max;
 
         //Possible types of searches
-        public enum     Attribute 
+        public enum     Attribute
                         {
-                        Overlap, 
-                        CanonicalMatch, 
+                        Overlap,
+                        CanonicalMatch,
                         Count
                         }
 
-        public enum     AttributeValue 
+        public enum     AttributeValue
                         {
-                        Default = -1, 
-                        Off, 
-                        On, 
+                        Default = -1,
+                        Off,
+                        On,
                         Count
                         }
 
         /***********************************************************************
 
-                Creating a search iterator data struct using the argument 
+                Creating a search iterator data struct using the argument
                 locale language rule set
 
         ***********************************************************************/
 
-        this (UText pattern, UText text, inout ULocale locale, UBreakIterator iterator = null)
+        this (UStringView pattern, UStringView text, inout ULocale locale, UBreakIterator* iterator = null)
         {
-                Error e;
+                UErrorCode e;
 
                 this.iterator = iterator;
-                handle = usearch_open (pattern.get.ptr, pattern.length, text.get.ptr, text.length, toString(locale.name), cast(void*) iterator, e);
+                handle = usearch_open (pattern.get.ptr, pattern.length, text.get.ptr, text.length, toString(locale.name), ( iterator is null ) ? null : iterator.handle, e);
                 testError (e, "failed to open search");
         }
 
         /***********************************************************************
 
-                Creating a search iterator data struct using the argument 
+                Creating a search iterator data struct using the argument
                 locale language rule set
 
         ***********************************************************************/
 
-        this (UText pattern, UText text, UCollator col, UBreakIterator iterator = null)
+        this (UStringView pattern, UStringView text, UCollator col, UBreakIterator* iterator = null)
         {
-                Error e;
+                UErrorCode e;
 
                 this.iterator = iterator;
-                handle = usearch_openFromCollator (pattern.get.ptr, pattern.length, text.get.ptr, text.length, col.handle, cast(void*) iterator, e);
+                handle = usearch_openFromCollator (pattern.get.ptr, pattern.length, text.get.ptr, text.length, col.handle, ( iterator is null ) ? null : iterator.handle, e);
                 testError (e, "failed to open search from collator");
         }
 
         /***********************************************************************
-        
+
                 Close this USearch
 
         ***********************************************************************/
@@ -242,65 +242,65 @@
         }
 
         /***********************************************************************
-        
-                Sets the current position in the text string which the 
+
+                Sets the current position in the text string which the
                 next search will start from.
-                
+
         ***********************************************************************/
 
         void setOffset (uint position)
-        {       
-                Error e;
+        {
+                UErrorCode e;
 
                 usearch_setOffset (handle, position, e);
                 testError (e, "failed to set search offset");
         }
 
         /***********************************************************************
-        
+
                 Return the current index in the string text being searched
 
         ***********************************************************************/
 
         uint getOffset ()
-        {       
+        {
                 return usearch_getOffset (handle);
         }
 
         /***********************************************************************
-        
-                Returns the index to the match in the text string that was 
+
+                Returns the index to the match in the text string that was
                 searched
 
         ***********************************************************************/
 
         uint getMatchedStart ()
-        {       
+        {
                 return usearch_getMatchedStart (handle);
         }
 
         /***********************************************************************
-        
-                Returns the length of text in the string which matches the 
+
+                Returns the length of text in the string which matches the
                 search pattern
 
         ***********************************************************************/
 
         uint getMatchedLength ()
-        {       
+        {
                 return usearch_getMatchedLength (handle);
         }
 
         /***********************************************************************
-        
-                Returns the text that was matched by the most recent call to 
+
+                Returns the text that was matched by the most recent call to
                 first(), next(), previous(), or last().
 
         ***********************************************************************/
 
         void getMatchedText (UString s)
-        {       
-                uint fmt (wchar* dst, uint length, inout Error e)
+        {
+                uint fmt (wchar* dst, uint length, inout UErrorCode e)
                 {
                         return usearch_getMatchedText (handle, dst, length, e);
                 }
@@ -309,188 +309,188 @@
         }
 
         /***********************************************************************
-        
+
                 Set the string text to be searched.
 
         ***********************************************************************/
 
-        void setText (UText t)
-        {       
-                Error e;
+        void setText (UStringView t)
+        {
+                UErrorCode e;
 
                 usearch_setText (handle, t.get.ptr, t.length, e);
                 testError (e, "failed to set search text");
         }
 
         /***********************************************************************
-                
-                Return the string text to be searched. Note that this 
+
+                Return the string text to be searched. Note that this
                 returns a read-only reference to the search text.
 
         ***********************************************************************/
 
-        UText getText ()
-        {       
+        UStringView getText ()
+        {
                 uint len;
 
                 wchar *x = usearch_getText (handle, &len);
-                return new UText (x[0..len]);
+                return new UStringView (x[0..len]);
         }
 
         /***********************************************************************
-        
+
                 Sets the pattern used for matching
 
         ***********************************************************************/
 
-        void setPattern (UText t)
-        {       
-                Error e;
+        void setPattern (UStringView t)
+        {
+                UErrorCode e;
 
                 usearch_setPattern (handle, t.get.ptr, t.length, e);
                 testError (e, "failed to set search pattern");
         }
 
         /***********************************************************************
-                
-                Gets the search pattern. Note that this returns a 
+
+                Gets the search pattern. Note that this returns a
                 read-only reference to the pattern.
 
         ***********************************************************************/
 
-        UText getPattern ()
-        {       
+        UStringView getPattern ()
+        {
                 uint len;
 
                 wchar *x = usearch_getPattern (handle, &len);
-                return new UText (x[0..len]);
+                return new UStringView (x[0..len]);
         }
 
         /***********************************************************************
-        
-                Set the BreakIterator that will be used to restrict the 
+
+                Set the BreakIterator that will be used to restrict the
                 points at which matches are detected.
 
         ***********************************************************************/
 
-        void setIterator (UBreakIterator iterator)
-        {       
-                Error e;
+        void setIterator (UBreakIterator* iterator)
+        {
+                UErrorCode e;
 
                 this.iterator = iterator;
-                usearch_setBreakIterator (handle, iterator.handle, e);
+                usearch_setBreakIterator (handle, cast(Handle)iterator.handle, e);
                 testError (e, "failed to set search iterator");
         }
 
         /***********************************************************************
-        
-                Get the BreakIterator that will be used to restrict the 
+
+                Get the BreakIterator that will be used to restrict the
                 points at which matches are detected.
 
         ***********************************************************************/
 
-        UBreakIterator getIterator ()
-        {       
+        UBreakIterator* getIterator ()
+        {
                 return iterator;
         }
 
         /***********************************************************************
-                
-                Returns the first index at which the string text matches 
+
+                Returns the first index at which the string text matches
                 the search pattern
-                                        
+
         ***********************************************************************/
 
         uint first ()
-        {     
-                Error e;
-                
+        {
+                UErrorCode e;
+
                 uint x = usearch_first (handle, e);
-                testError (e, "failed on first search");  
+                testError (e, "failed on first search");
                 return x;
         }
 
         /***********************************************************************
-                
-                Returns the last index in the target text at which it 
+
+                Returns the last index in the target text at which it
                 matches the search pattern
 
         ***********************************************************************/
 
         uint last ()
-        {     
-                Error e;
-                
+        {
+                UErrorCode e;
+
                 uint x = usearch_last (handle, e);
-                testError (e, "failed on last search");  
+                testError (e, "failed on last search");
                 return x;
         }
 
         /***********************************************************************
-                
-                Returns the index of the next point at which the string 
+
+                Returns the index of the next point at which the string
                 text matches the search pattern, starting from the current
                 position.
 
-                If pos is specified, returns the first index greater than 
+                If pos is specified, returns the first index greater than
                 pos at which the string text matches the search pattern
 
         ***********************************************************************/
 
         uint next (uint pos = uint.max)
-        {     
-                Error e;
+        {
+                UErrorCode e;
                 uint  x;
 
-                x = (pos == uint.max) ? usearch_next (handle, e) : 
+                x = (pos == uint.max) ? usearch_next (handle, e) :
                                         usearch_following (handle, pos, e);
 
-                testError (e, "failed on next search");  
+                testError (e, "failed on next search");
                 return x;
         }
 
         /***********************************************************************
 
-                Returns the index of the previous point at which the 
-                string text matches the search pattern, starting at 
-                the current position.                 
+                Returns the index of the previous point at which the
+                string text matches the search pattern, starting at
+                the current position.
 
-                If pos is specified, returns the first index less 
-                than pos at which the string text matches the search 
+                If pos is specified, returns the first index less
+                than pos at which the string text matches the search
                 pattern.
 
         ***********************************************************************/
 
         uint previous (uint pos = uint.max)
-        {     
-                Error e;
+        {
+                UErrorCode e;
                 uint  x;
 
-                x = (pos == uint.max) ? usearch_previous  (handle, e) : 
+                x = (pos == uint.max) ? usearch_previous  (handle, e) :
                                         usearch_preceding (handle, pos, e);
 
-                testError (e, "failed on next search");  
+                testError (e, "failed on next search");
                 return x;
         }
 
         /***********************************************************************
-        
-                Search will begin at the start of the text string if a 
-                forward iteration is initiated before a backwards iteration. 
-                Otherwise if a backwards iteration is initiated before a 
-                forwards iteration, the search will begin at the end of the 
+
+                Search will begin at the start of the text string if a
+                forward iteration is initiated before a backwards iteration.
+                Otherwise if a backwards iteration is initiated before a
+                forwards iteration, the search will begin at the end of the
                 text string
 
         ***********************************************************************/
 
         void reset ()
-        {     
+        {
                 usearch_reset (handle);
         }
 
         /***********************************************************************
-        
-                Gets the collator used for the language rules. 
+
+                Gets the collator used for the language rules.
 
         ***********************************************************************/
 
@@ -500,20 +500,20 @@
         }
 
         /***********************************************************************
-        
-                Sets the collator used for the language rules. This 
-                method causes internal data such as Boyer-Moore shift 
-                tables to be recalculated, but the iterator's position 
+
+                Sets the collator used for the language rules. This
+                method causes internal data such as Boyer-Moore shift
+                tables to be recalculated, but the iterator's position
                 is unchanged
 
         ***********************************************************************/
 
         void setCollator (UCollator col)
         {
-                Error e;
+                UErrorCode e;
 
                 usearch_setCollator (handle, col.handle, e);
-                testError (e, "failed to set search collator");  
+                testError (e, "failed to set search collator");
         }
 
 
@@ -522,49 +522,49 @@
                 Bind the ICU functions from a shared library. This is
                 complicated by the issues regarding D and DLLs on the
                 Windows platform
-        
+
         ***********************************************************************/
-              
+
         private static void* library;
 
         /***********************************************************************
 
         ***********************************************************************/
 
-        private static extern (C) 
+        private static extern (C)
         {
-                Handle  function (wchar*, uint, wchar*, uint, char*, void*, inout Error) usearch_open;
-                Handle  function (wchar*, uint, wchar*, uint, Handle, void*, inout Error) usearch_openFromCollator;
+                Handle  function (wchar*, uint, wchar*, uint, char*, void*, inout UErrorCode) usearch_open;
+                Handle  function (wchar*, uint, wchar*, uint, Handle, void*, inout UErrorCode) usearch_openFromCollator;
                 void    function (Handle) usearch_close;
-                void    function (Handle, uint, inout Error) usearch_setOffset;
+                void    function (Handle, uint, inout UErrorCode) usearch_setOffset;
                 uint    function (Handle) usearch_getOffset;
                 uint    function (Handle) usearch_getMatchedStart;
                 uint    function (Handle) usearch_getMatchedLength;
-                uint    function (Handle, wchar*, uint, inout Error) usearch_getMatchedText;
-                void    function (Handle, wchar*, uint, inout Error) usearch_setText;
+                uint    function (Handle, wchar*, uint, inout UErrorCode) usearch_getMatchedText;
+                void    function (Handle, wchar*, uint, inout UErrorCode) usearch_setText;
                 wchar*  function (Handle, uint*) usearch_getText;
-                void    function (Handle, wchar*, uint, inout Error) usearch_setPattern;
+                void    function (Handle, wchar*, uint, inout UErrorCode) usearch_setPattern;
                 wchar*  function (Handle, uint*) usearch_getPattern;
-                uint    function (Handle, inout Error) usearch_first;
-                uint    function (Handle, inout Error) usearch_last;
-                uint    function (Handle, inout Error) usearch_next;
-                uint    function (Handle, inout Error) usearch_previous;
-                uint    function (Handle, uint, inout Error) usearch_following;
-                uint    function (Handle, uint, inout Error) usearch_preceding;
+                uint    function (Handle, inout UErrorCode) usearch_first;
+                uint    function (Handle, inout UErrorCode) usearch_last;
+                uint    function (Handle, inout UErrorCode) usearch_next;
+                uint    function (Handle, inout UErrorCode) usearch_previous;
+                uint    function (Handle, uint, inout UErrorCode) usearch_following;
+                uint    function (Handle, uint, inout UErrorCode) usearch_preceding;
                 void    function (Handle) usearch_reset;
-                void    function (Handle, Handle, inout Error) usearch_setBreakIterator;
+                void    function (Handle, Handle, inout UErrorCode) usearch_setBreakIterator;
                 Handle  function (Handle) usearch_getCollator;
-                void    function (Handle, Handle, inout Error) usearch_setCollator;
+                void    function (Handle, Handle, inout UErrorCode) usearch_setCollator;
         }
 
         /***********************************************************************
 
         ***********************************************************************/
 
-        static  FunctionLoader.Bind[] targets = 
+        static  FunctionLoader.Bind[] targets =
                 [
-                {cast(void**) &usearch_open,             "usearch_open"}, 
-                {cast(void**) &usearch_openFromCollator, "usearch_openFromCollator"}, 
+                {cast(void**) &usearch_open,             "usearch_open"},
+                {cast(void**) &usearch_openFromCollator, "usearch_openFromCollator"},
                 {cast(void**) &usearch_close,            "usearch_close"},
                 {cast(void**) &usearch_setOffset,        "usearch_setOffset"},
                 {cast(void**) &usearch_getOffset,        "usearch_getOffset"},
--- a/dwtx/dwtxhelper/mangoicu/USet.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/USet.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,10 +82,10 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.USet;
+module dwtx.dwtxhelper.mangoicu.USet;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
 /*******************************************************************************
 
@@ -152,9 +152,9 @@
 
         ***********************************************************************/
 
-        this (UText pattern, Options o = Options.None)
+        this (UStringView pattern, Options o = Options.None)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = uset_openPatternOptions (pattern.get.ptr, pattern.len, o, e);
                 testError (e, "failed to open pattern-based charset");
@@ -192,9 +192,9 @@
 
         ***********************************************************************/
         
-        void applyPattern (UText pattern, Options o = Options.None)
+        void applyPattern (UStringView pattern, Options o = Options.None)
         {
-                Error e;
+                UErrorCode e;
 
                 uset_applyPattern (handle, pattern.get.ptr, pattern.len, o, e);
                 testError (e, "failed to apply pattern");
@@ -210,7 +210,7 @@
         
         void toPattern (UString dst, bool escape)
         {
-                uint fmt (wchar* p, uint len, inout Error e)
+                uint fmt (wchar* p, uint len, inout UErrorCode e)
                 {
                         return uset_toPattern (handle, p, len, escape, e);
                 }
@@ -265,7 +265,7 @@
 
         ***********************************************************************/
 
-        void addString (UText t)
+        void addString (UStringView t)
         {
                 uset_addString (handle, t.get.ptr, t.len);
         }
@@ -301,7 +301,7 @@
 
         ***********************************************************************/
 
-        void removeString (UText t)
+        void removeString (UStringView t)
         {
                 uset_removeString (handle, t.get.ptr, t.len);
         }
@@ -372,7 +372,7 @@
 
         ***********************************************************************/
 
-        bool containsString (UText t)
+        bool containsString (UStringView t)
         {
                 return uset_containsString (handle, t.get.ptr, t.len) != 0;
         }
@@ -405,9 +405,9 @@
         {
                 Handle function (wchar start, wchar end) uset_open;
                 void   function (Handle) uset_close;
-                Handle function (wchar* pattern, uint patternLength, uint options, inout Error e) uset_openPatternOptions;                        
-                uint   function (Handle, wchar* pattern, uint patternLength, uint options, inout Error e) uset_applyPattern;
-                uint   function (Handle, wchar* result, uint resultCapacity, byte escapeUnprintable, inout Error e) uset_toPattern;
+                Handle function (wchar* pattern, uint patternLength, uint options, inout UErrorCode e) uset_openPatternOptions;                        
+                uint   function (Handle, wchar* pattern, uint patternLength, uint options, inout UErrorCode e) uset_applyPattern;
+                uint   function (Handle, wchar* result, uint resultCapacity, byte escapeUnprintable, inout UErrorCode e) uset_toPattern;
                 void   function (Handle, wchar c) uset_add;
                 void   function (Handle, Handle additionalSet) uset_addAll;
                 void   function (Handle, wchar start, wchar end) uset_addRange;                        
--- a/dwtx/dwtxhelper/mangoicu/UString.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UString.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,11 +82,11 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UString;
+module dwtx.dwtxhelper.mangoicu.UString;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UChar,
-                dwtx.dwthelper.mangoicu.ULocale;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UChar,
+                dwtx.dwtxhelper.mangoicu.ULocale;
 
 /*******************************************************************************
 
@@ -109,7 +109,7 @@
         }
      else
         {
-        private import  dwtx.dwthelper.mangoicu.UMango;
+        private import  dwtx.dwtxhelper.mangoicu.UMango;
 
         private import  mango.io.model.IReader,
                         mango.io.model.IWriter;
@@ -155,7 +155,7 @@
 
 *******************************************************************************/
 
-class UString : UText, IStringOther
+class UString : UStringView, IStringOther
 {
         alias opCat             append;
         alias opIndexAssign     setCharAt;
@@ -188,12 +188,12 @@
 
         /***********************************************************************
 
-                Create a UString via the content of a UText. Note that the
+                Create a UString via the content of a UStringView. Note that the
                 default is to assume the content is immutable (read-only).
 
         ***********************************************************************/
 
-        this (UText other, bool mutable = false)
+        this (UStringView other, bool mutable = false)
         {
                 this (other.get, mutable);
         }
@@ -295,7 +295,7 @@
 
                         To be safe, we ask the allocator in use whether
                         the content it provided can be mutated or not.
-                        Note that this is not necessary for UText, since
+                        Note that this is not necessary for UStringView, since
                         that is a read-only construct.
 
                 ***************************************************************/
@@ -356,7 +356,7 @@
 
         ***********************************************************************/
 
-        UString opCat (UText other)
+        UString opCat (UStringView other)
         {
                 return opCat (other.get);
         }
@@ -367,7 +367,7 @@
 
         ***********************************************************************/
 
-        UString opCat (UText other, uint start, uint len=uint.max)
+        UString opCat (UStringView other, uint start, uint len=uint.max)
         {
                 other.pinIndices (start, len);
                 return opCat (other.content [start..start+len]);
@@ -403,7 +403,7 @@
 
         UString opCat (char[] chars)
         {
-                uint fmt (wchar* dst, uint len, inout Error e)
+                uint fmt (wchar* dst, uint len, inout UErrorCode e)
                 {
                         uint x;
 
@@ -459,7 +459,7 @@
 
         ***********************************************************************/
 
-        UString setTo (UText other, bool mutable = true)
+        UString setTo (UStringView other, bool mutable = true)
         {
                 return setTo (other.get, mutable);
         }
@@ -474,7 +474,7 @@
 
         ***********************************************************************/
 
-        UString setTo (UText other, uint start, uint len, bool mutable = true)
+        UString setTo (UStringView other, uint start, uint len, bool mutable = true)
         {
                 other.pinIndices (start, len);
                 return setTo (other.content [start..start+len], mutable);
@@ -621,11 +621,11 @@
 
         ***********************************************************************/
 
-        typedef uint delegate (wchar* dst, uint len, inout Error e) Formatter;
+        typedef uint delegate (wchar* dst, uint len, inout UErrorCode e) Formatter;
 
         package final UString format (Formatter format, char[] msg)
         {
-                Error   e;
+                UErrorCode   e;
                 uint    length;
 
                 while (true)
@@ -653,11 +653,11 @@
 
 *******************************************************************************/
 
-class UText : ICU, ITextOther
+class UStringView : ICU, ITextOther
 {
         alias opIndex   charAt;
 
-        // the core of the UText and UString attributes. The name 'len'
+        // the core of the UStringView and UString attributes. The name 'len'
         // is used rather than the more obvious 'length' since there is
         // a collision with the silly array[length] syntactic sugar ...
         package uint    len;
@@ -666,7 +666,7 @@
         // this should probably be in UString only, but there seems to
         // be a compiler bug where it doesn't get initialised correctly,
         // and it's perhaps useful to have here for when a UString is
-        // passed as a UText argument.
+        // passed as a UStringView argument.
         private bool    mutable;
 
         // toFolded() argument
@@ -715,7 +715,7 @@
 
         /***********************************************************************
 
-                Return the valid content from this UText
+                Return the valid content from this UStringView
 
         ***********************************************************************/
 
@@ -726,13 +726,13 @@
 
         /***********************************************************************
 
-                Is this UText equal to another?
+                Is this UStringView equal to another?
 
         ***********************************************************************/
 
         final override int opEquals (Object o)
         {
-                UText other = cast(UText) o;
+                UStringView other = cast(UStringView) o;
 
                 if (other)
                     return (other is this || compare (other) == 0);
@@ -741,13 +741,13 @@
 
         /***********************************************************************
 
-                Compare this UText to another.
+                Compare this UStringView to another.
 
         ***********************************************************************/
 
         final override int opCmp (Object o)
         {
-                UText other = cast(UText) o;
+                UStringView other = cast(UStringView) o;
 
                 if (other is this)
                     return 0;
@@ -759,7 +759,7 @@
 
         /***********************************************************************
 
-                Hash this UText
+                Hash this UStringView
 
         ***********************************************************************/
 
@@ -770,7 +770,7 @@
 
         /***********************************************************************
 
-                Clone this UText into a UString
+                Clone this UStringView into a UString
 
         ***********************************************************************/
 
@@ -781,7 +781,7 @@
 
         /***********************************************************************
 
-                Clone a section of this UText into a UString
+                Clone a section of this UStringView into a UString
 
         ***********************************************************************/
 
@@ -859,7 +859,7 @@
 
         ***********************************************************************/
 
-        final int compare (UText other, bool codePointOrder=false)
+        final int compare (UStringView other, bool codePointOrder=false)
         {
                 return compare (other.get, codePointOrder);
         }
@@ -895,7 +895,7 @@
 
         ***********************************************************************/
 
-        final int compareFolded (UText other, CaseOption option = CaseOption.Default)
+        final int compareFolded (UStringView other, CaseOption option = CaseOption.Default)
         {
                 return compareFolded (other.content, option);
         }
@@ -920,18 +920,18 @@
 
         /***********************************************************************
 
-                Does this UText start with specified string?
+                Does this UStringView start with specified string?
 
         ***********************************************************************/
 
-        final bool startsWith (UText other)
+        final bool startsWith (UStringView other)
         {
                 return startsWith (other.get);
         }
 
         /***********************************************************************
 
-                Does this UText start with specified string?
+                Does this UStringView start with specified string?
 
         ***********************************************************************/
 
@@ -944,18 +944,18 @@
 
         /***********************************************************************
 
-                Does this UText end with specified string?
+                Does this UStringView end with specified string?
 
         ***********************************************************************/
 
-        final bool endsWith (UText other)
+        final bool endsWith (UStringView other)
         {
                 return endsWith (other.get);
         }
 
         /***********************************************************************
 
-                Does this UText end with specified string?
+                Does this UStringView end with specified string?
 
         ***********************************************************************/
 
@@ -995,7 +995,7 @@
 
         ***********************************************************************/
 
-        final uint indexOf (UText other, uint start=0)
+        final uint indexOf (UStringView other, uint start=0)
         {
                 return indexOf (other.get, start);
         }
@@ -1046,7 +1046,7 @@
 
         ***********************************************************************/
 
-        final uint lastIndexOf (UText other, uint start=uint.max)
+        final uint lastIndexOf (UStringView other, uint start=uint.max)
         {
                 return lastIndexOf (other.get, start);
         }
@@ -1103,7 +1103,7 @@
 
         final UString toLower (UString dst, inout ULocale locale)
         {
-                uint lower (wchar* dst, uint length, inout Error e)
+                uint lower (wchar* dst, uint length, inout UErrorCode e)
                 {
                         return u_strToLower (dst, length, content.ptr, len, ICU.toString(locale.name), e);
                 }
@@ -1143,7 +1143,7 @@
 
         final UString toUpper (UString dst, inout ULocale locale)
         {
-                uint upper (wchar* dst, uint length, inout Error e)
+                uint upper (wchar* dst, uint length, inout UErrorCode e)
                 {
                         return u_strToUpper (dst, length, content.ptr, len, ICU.toString(locale.name), e);
                 }
@@ -1169,7 +1169,7 @@
 
         final UString toFolded (UString dst, CaseOption option = CaseOption.Default)
         {
-                uint fold (wchar* dst, uint length, inout Error e)
+                uint fold (wchar* dst, uint length, inout UErrorCode e)
                 {
                         return u_strFoldCase (dst, length, content.ptr, len, option, e);
                 }
@@ -1195,7 +1195,7 @@
         final char[] toUtf8 (char[] dst = null)
         {
                 uint    x;
-                Error   e;
+                UErrorCode   e;
 
                 if (! cast(char*) dst)
                       dst = new char[len * 4];
@@ -1207,12 +1207,12 @@
 
         /***********************************************************************
 
-                Remove leading and trailing whitespace from this UText.
+                Remove leading and trailing whitespace from this UStringView.
                 Note that we slice the content to remove leading space.
 
         ***********************************************************************/
 
-        UText trim ()
+        UStringView trim ()
         {
                 wchar   c;
                 uint    i = len;
@@ -1410,7 +1410,7 @@
 
         final private int compareFolded (wchar[] s1, wchar[] s2, CaseOption option = CaseOption.Default)
         {
-                Error e;
+                UErrorCode e;
 
                 int x = u_strCaseCompare (s1.ptr, s1.length, s2.ptr, s2.length, option, e);
                 testError (e, "compareFolded failed");
@@ -1439,14 +1439,14 @@
                 wchar* function (wchar*, wchar, uint) u_memchr;
                 wchar* function (wchar*, wchar, uint) u_memrchr;
                 int    function (wchar*, uint, wchar*, uint, bool) u_strCompare;
-                int    function (wchar*, uint, wchar*, uint, uint, inout Error) u_strCaseCompare;
+                int    function (wchar*, uint, wchar*, uint, uint, inout UErrorCode) u_strCaseCompare;
                 dchar  function (CharAt, uint*, uint, void*) u_unescapeAt;
                 uint   function (wchar*, uint) u_countChar32;
-                uint   function (wchar*, uint, wchar*, uint, char*, inout Error) u_strToUpper;
-                uint   function (wchar*, uint, wchar*, uint, char*, inout Error) u_strToLower;
-                uint   function (wchar*, uint, wchar*, uint, uint, inout Error) u_strFoldCase;
-                wchar* function (wchar*, uint, uint*, char*, uint, inout Error) u_strFromUTF8;
-                char*  function (char*, uint, uint*, wchar*, uint, inout Error) u_strToUTF8;
+                uint   function (wchar*, uint, wchar*, uint, char*, inout UErrorCode) u_strToUpper;
+                uint   function (wchar*, uint, wchar*, uint, char*, inout UErrorCode) u_strToLower;
+                uint   function (wchar*, uint, wchar*, uint, uint, inout UErrorCode) u_strFoldCase;
+                wchar* function (wchar*, uint, uint*, char*, uint, inout UErrorCode) u_strFromUTF8;
+                char*  function (char*, uint, uint*, wchar*, uint, inout UErrorCode) u_strToUTF8;
         }
 
         /***********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/UStringPrep.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UStringPrep.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,10 +82,10 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UStringPrep;
+module dwtx.dwtxhelper.mangoicu.UStringPrep;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
 /*******************************************************************************
 
@@ -158,7 +158,7 @@
 
         this (char[] path, char[] filename)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = usprep_open (toString(path), toString(filename), e);
                 testError (e, "failed to open string-prep");
@@ -185,9 +185,9 @@
 
         ***********************************************************************/
 
-        void prepare (UText src, UString dst, Options o = Options.Strict)
+        void prepare (UStringView src, UString dst, Options o = Options.Strict)
         {
-                uint fmt (wchar* p, uint len, inout Error e)
+                uint fmt (wchar* p, uint len, inout UErrorCode e)
                 {
                         return usprep_prepare (handle, src.get.ptr, src.len, p, len, o, null, e);
                 }
@@ -212,9 +212,9 @@
 
         private static extern (C) 
         {
-                Handle  function (char*, char*, inout Error) usprep_open;
+                Handle  function (char*, char*, inout UErrorCode) usprep_open;
                 void    function (Handle) usprep_close;
-                uint    function (Handle, wchar*, uint, wchar*, uint, uint, void*, inout Error) usprep_prepare;
+                uint    function (Handle, wchar*, uint, wchar*, uint, uint, void*, inout UErrorCode) usprep_prepare;
         }
 
         /***********************************************************************
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwtx/dwtxhelper/mangoicu/UText.d	Mon Jul 07 15:53:07 2008 +0200
@@ -0,0 +1,241 @@
+/*******************************************************************************
+
+        @file UString.d
+
+        Copyright (c) 2008 Frank Benoit
+
+        This software is provided 'as-is', without any express or implied
+        warranty. In no event will the authors be held liable for damages
+        of any kind arising from the use of this software.
+
+        Permission is hereby granted to anyone to use this software for any
+        purpose, including commercial applications, and to alter it and/or
+        redistribute it freely, subject to the following restrictions:
+
+        1. The origin of this software must not be misrepresented; you must
+           not claim that you wrote the original software. If you use this
+           software in a product, an acknowledgment within documentation of
+           said product would be appreciated but is not required.
+
+        2. Altered source versions must be plainly marked as such, and must
+           not be misrepresented as being the original software.
+
+        3. This notice may not be removed or altered from any distribution
+           of the source.
+
+        4. Derivative works are permitted, but they must carry this notice
+           in full and credit the original source.
+
+
+                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+        @version        Initial version, July 2008
+        @author         Frank
+
+        Note that this package and documentation is built around the ICU
+        project (http://oss.software.ibm.com/icu/). Below is the license
+        statement as specified by that software:
+
+
+                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+        ICU License - ICU 1.8.1 and later
+
+        COPYRIGHT AND PERMISSION NOTICE
+
+        Copyright (c) 1995-2003 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.
+
+*******************************************************************************/
+module dwtx.dwtxhelper.mangoicu.UText;
+
+import dwtx.dwtxhelper.mangoicu.ICU;
+
+struct UText {
+    // UText private fields -- start
+    private {
+        uint        magic = UTEXT_MAGIC;
+        int         flags = 0;
+        int         providerProperties = 0;
+        int         sizeOfStruct = UText.sizeof;
+        long        chunkNativeLimit = 0;
+        int         extraSize = 0;
+        int         nativeIndexingLimit = 0;
+        long        chunkNativeStart = 0;
+        int         chunkOffset = 0;
+        int         chunkLength = 0;
+        wchar*      chunkContents = null;
+        void*       pFuncs = null;
+        void*       pExtra = null;
+        void*       context = null;
+        void*       p = null;
+        void*       q = null;
+        void*       r = null;
+        void*       privP = null;
+        long        a = 0;
+        int         b = 0;
+        int         c = 0;
+        long        privA = 0;
+        int         privB = 0;
+        int         privC = 0;
+    } // UText private fields -- end
+    // do not add any non-static fields
+
+    private enum {
+        UTEXT_MAGIC = 0x345ad82c
+    }
+    void close(){
+        utext_close(this);
+    }
+    private void ensureStatusOk( ICU.UErrorCode status ){
+        if( status !is ICU.UErrorCode.OK ){
+            throw new Exception( "ICU Exception" );
+        }
+    }
+    void openUTF8( char[] str ){
+        auto status = ICU.UErrorCode.OK;
+        utext_openUTF8(this, str.ptr, str.length, status );
+        ensureStatusOk( status );
+    }
+
+
+        /***********************************************************************
+
+                Bind the ICU functions from a shared library. This is
+                complicated by the issues regarding D and DLLs on the
+                Windows platform
+
+        ***********************************************************************/
+
+        private static void* library;
+
+        /***********************************************************************
+
+        ***********************************************************************/
+    static extern(System){
+        UText * function(UText* ut) utext_close;
+        UText * function(UText* ut, char *s, long length, inout ICU.UErrorCode status) utext_openUTF8;
+//         UText * function(UText* ut, UChar *s, int64_t length, inout UErrorCode status) utext_openUChars;
+//         UText * function(UText* ut, U_NAMESPACE_QUALIFIER UnicodeString *s, inout UErrorCode status) utext_openUnicodeString;
+//         UText * function(UText* ut, U_NAMESPACE_QUALIFIER UnicodeString *s, inout UErrorCode status) utext_openConstUnicodeString;
+//         UText * function(UText* ut, U_NAMESPACE_QUALIFIER Replaceable *rep, inout UErrorCode status) utext_openReplaceable;
+//         UText * function(UText* ut, U_NAMESPACE_QUALIFIER CharacterIterator *ic, inout UErrorCode status) utext_openCharacterIterator;
+//         UText * function(UText* ut, UText *src, UBool deep, UBool readOnly, inout UErrorCode status) utext_clone;
+//         UBool function(const UText *a, const UText *b) utext_equals;
+//         int64_t function(UText* ut) utext_nativeLength;
+//         UBool function(UText* ut) utext_isLengthExpensive;
+//         UChar32 function(UText* ut, int64_t nativeIndex) utext_char32At;
+//         UChar32 function(UText* ut) utext_current32;
+//         UChar32 function(UText* ut) utext_next32;
+//         UChar32 function(UText* ut) utext_previous32;
+//         UChar32 function(UText* ut, int64_t nativeIndex) utext_next32From;
+//         UChar32 function(UText* ut, int64_t nativeIndex) utext_previous32From;
+//         int64_t function(UText* ut) utext_getNativeIndex;
+//         void function(UText* ut, int64_t nativeIndex) utext_setNativeIndex;
+//         UBool function(UText* ut, int delta) utext_moveIndex32;
+//         int64_t function(UText* ut) utext_getPreviousNativeIndex;
+//         int function(UText* ut, int64_t nativeStart, int64_t nativeLimit,
+//                 UChar *dest, int destCapacity,
+//                 inout UErrorCode status) utext_extract;
+//         UBool function(UText* ut) utext_isWritable;
+//         UBool function(UText* ut) utext_hasMetaData;
+//         int function(UText* ut,
+//                 int64_t nativeStart, int64_t nativeLimit,
+//                 UChar *replacementText, int replacementLength,
+//                 inout UErrorCode status) utext_replace;
+//         void function(UText* ut,
+//                 int64_t nativeStart, int64_t nativeLimit,
+//                 int64_t destIndex,
+//                 UBool move,
+//                 inout UErrorCode status) utext_copy;
+//         void function(UText* ut) utext_freeze;
+//         UText * function(UText* ut, int extraSpace, inout UErrorCode status) utext_setup;
+    }
+
+        /***********************************************************************
+
+        ***********************************************************************/
+        static  FunctionLoader.Bind[] targets = [
+            {cast(void**) &utext_close,                   "utext_close"},
+            {cast(void**) &utext_openUTF8,                "utext_openUTF8"},
+//         {cast(void**) &utext_openUChars,              "utext_openUChars"},
+//         {cast(void**) &utext_openUnicodeString,       "utext_openUnicodeString"},
+//         {cast(void**) &utext_openConstUnicodeString,  "utext_openConstUnicodeString"},
+//         {cast(void**) &utext_openReplaceable,         "utext_openReplaceable"},
+//         {cast(void**) &utext_openCharacterIterator,   "utext_openCharacterIterator"},
+//         {cast(void**) &utext_clone,                   "utext_clone"},
+//         {cast(void**) &utext_equals,                  "utext_equals"},
+//         {cast(void**) &utext_nativeLength,            "utext_nativeLength"},
+//         {cast(void**) &utext_isLengthExpensive,       "utext_isLengthExpensive"},
+//         {cast(void**) &utext_char32At,                "utext_char32At"},
+//         {cast(void**) &utext_current32,               "utext_current32"},
+//         {cast(void**) &utext_next32,                  "utext_next32"},
+//         {cast(void**) &utext_next32From,              "utext_next32From"},
+//         {cast(void**) &utext_previous32,              "utext_previous32"},
+//         {cast(void**) &utext_previous32From,          "utext_previous32From"},
+//         {cast(void**) &utext_setNativeIndex,          "utext_setNativeIndex"},
+//         {cast(void**) &utext_moveIndex32,             "utext_moveIndex32"},
+//         {cast(void**) &utext_getPreviousNativeIndex,  "utext_getPreviousNativeIndex"},
+//         {cast(void**) &utext_extract,                 "utext_extract"},
+//         {cast(void**) &utext_isWritable,              "utext_isWritable"},
+//         {cast(void**) &utext_hasMetaData,             "utext_hasMetaData"},
+//         {cast(void**) &utext_replace,                 "utext_replace"},
+//         {cast(void**) &utext_copy,                    "utext_copy"},
+//         {cast(void**) &utext_freeze,                  "utext_freeze"},
+//         {cast(void**) &utext_setup,                   "utext_setup"},
+        ];
+
+        /***********************************************************************
+
+        ***********************************************************************/
+
+        static this ()
+        {
+                library = FunctionLoader.bind (ICU.icuuc, targets);
+                //test ();
+        }
+
+        /***********************************************************************
+
+        ***********************************************************************/
+
+        static ~this ()
+        {
+                FunctionLoader.unbind (library);
+        }
+
+}
--- a/dwtx/dwtxhelper/mangoicu/UTimeZone.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UTimeZone.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,11 +82,11 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UTimeZone;
+module dwtx.dwtxhelper.mangoicu.UTimeZone;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString,
-                dwtx.dwthelper.mangoicu.UEnumeration;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString,
+                dwtx.dwtxhelper.mangoicu.UEnumeration;
 
 /*******************************************************************************
 
@@ -143,7 +143,7 @@
 
         static void getDefault (inout UTimeZone zone)
         {       
-                uint format (wchar* dst, uint length, inout ICU.Error e)
+                uint format (wchar* dst, uint length, inout ICU.UErrorCode e)
                 {
                         return ucal_getDefaultTimeZone (dst, length, e);
                 }
@@ -161,7 +161,7 @@
 
         static void setDefault (inout UTimeZone zone)
         {       
-                ICU.Error e;
+                ICU.UErrorCode e;
 
                 ucal_setDefaultTimeZone (ICU.toString (zone.name), e);
                 ICU.testError (e, "failed to set default time zone");                
@@ -178,7 +178,7 @@
 
         static uint getDSTSavings (inout UTimeZone zone)
         {       
-                ICU.Error e;
+                ICU.UErrorCode e;
 
                 uint x = ucal_getDSTSavings (ICU.toString (zone.name), e);
                 ICU.testError (e, "failed to get DST savings");                
@@ -194,7 +194,7 @@
 
         static int opApply (int delegate(inout wchar[] element) dg)
         {
-                ICU.Error       e;
+                ICU.UErrorCode       e;
                 wchar[]         name;
                 int             result;
 
@@ -225,10 +225,10 @@
 
         private static extern (C) 
         {
-                void* function (inout ICU.Error) ucal_openTimeZones;
-                uint  function (wchar*, uint, inout ICU.Error) ucal_getDefaultTimeZone;
-                void  function (wchar*, inout ICU.Error) ucal_setDefaultTimeZone;
-                uint  function (wchar*, inout ICU.Error) ucal_getDSTSavings;
+                void* function (inout ICU.UErrorCode) ucal_openTimeZones;
+                uint  function (wchar*, uint, inout ICU.UErrorCode) ucal_getDefaultTimeZone;
+                void  function (wchar*, inout ICU.UErrorCode) ucal_setDefaultTimeZone;
+                uint  function (wchar*, inout ICU.UErrorCode) ucal_getDSTSavings;
         }
 
         /***********************************************************************
--- a/dwtx/dwtxhelper/mangoicu/UTransform.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UTransform.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,10 +82,10 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UTransform;
+module dwtx.dwtxhelper.mangoicu.UTransform;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
 /*******************************************************************************
 
@@ -109,9 +109,9 @@
 
         ***********************************************************************/
 
-        this (UText id)
+        this (UStringView id)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = utrans_openU (id.get.ptr, id.len, 0, null, 0, null, e);
                 testError (e, "failed to open ID transform");
@@ -121,9 +121,9 @@
 
         ***********************************************************************/
 
-        this (UText rule, Direction dir)
+        this (UStringView rule, Direction dir)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = utrans_openU (null, 0, dir, rule.get.ptr, rule.len, null, e);
                 testError (e, "failed to open rule-based transform");
@@ -142,20 +142,20 @@
 
         ***********************************************************************/
 
-        UText getID ()
+        UStringView getID ()
         {
                 uint len;
                 wchar *s = utrans_getUnicodeID (handle, len);
-                return new UText (s[0..len]);
+                return new UStringView (s[0..len]);
         }
 
         /***********************************************************************
 
         ***********************************************************************/
 
-        UTransform setFilter (UText filter)
+        UTransform setFilter (UStringView filter)
         {
-                Error e;
+                UErrorCode e;
 
                 if (filter.length)
                     utrans_setFilter (handle, filter.get.ptr, filter.len, e);
@@ -172,7 +172,7 @@
 
         UTransform execute (UString text)
         {
-                Error   e;
+                UErrorCode   e;
                 uint    textLen = text.len;
 
                 utrans_transUChars (handle, text.get.ptr, &textLen, text.content.length, 0, &text.len, e);
@@ -198,11 +198,11 @@
 
         private static extern (C) 
         {
-                Handle  function (wchar*, uint, uint, wchar*, uint, void*, inout Error) utrans_openU;
+                Handle  function (wchar*, uint, uint, wchar*, uint, void*, inout UErrorCode) utrans_openU;
                 void    function (Handle) utrans_close;
                 wchar*  function (Handle, inout uint) utrans_getUnicodeID;
-                void    function (Handle, wchar*, uint, inout Error) utrans_setFilter;
-                void    function (Handle, wchar*, uint*, uint, uint, uint*, inout Error) utrans_transUChars;
+                void    function (Handle, wchar*, uint, inout UErrorCode) utrans_setFilter;
+                void    function (Handle, wchar*, uint*, uint, uint, uint*, inout UErrorCode) utrans_transUChars;
         }
 
         /***********************************************************************
--- a/dwtx/ui/internal/forms/widgets/FormUtil.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/ui/internal/forms/widgets/FormUtil.d	Mon Jul 07 15:53:07 2008 +0200
@@ -42,10 +42,7 @@
 
 import dwt.dwthelper.utils;
 
-import  dwtx.dwtxhelper.BreakIterator;
-// import mango.icu.UString;
-// import mango.icu.ULocale;
-// import mango.icu.UBreakIterator;
+import  dwtx.dwtxhelper.mangoicu.UBreakIterator;
 
 public class FormUtil {
 
@@ -116,7 +113,7 @@
         int last = 0;
         int width = 0;
 
-        for (int loc = wb.first(); loc !is UBreakIterator.DONE; loc = wb.next()) {
+        for (int loc = wb.first(); loc !is UBreakIterator.Done; loc = wb.next()) {
             String word = text.substring(last, loc);
             Point extent = gc.textExtent(word);
             width = Math.max(width, extent.x);
@@ -138,7 +135,7 @@
         int last = 0;
         int height = lineHeight;
         int maxWidth = 0;
-        for (int loc = wb.first(); loc !is UBreakIterator.DONE; loc = wb.next()) {
+        for (int loc = wb.first(); loc !is UBreakIterator.Done; loc = wb.next()) {
             String word = text.substring(saved, loc);
             Point extent = gc.textExtent(word);
             if (extent.x > wHint) {
@@ -179,7 +176,7 @@
         int y = bounds.y;
         int width = bounds.width;
 
-        for (int loc = wb.first(); loc !is UBreakIterator.DONE; loc = wb.next()) {
+        for (int loc = wb.first(); loc !is UBreakIterator.Done; loc = wb.next()) {
             String line = text.substring(saved, loc);
             Point extent = gc.textExtent(line);
 
--- a/dwtx/ui/internal/forms/widgets/TextSegment.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/ui/internal/forms/widgets/TextSegment.d	Mon Jul 07 15:53:07 2008 +0200
@@ -28,10 +28,7 @@
 import dwt.graphics.Rectangle;
 
 import dwt.dwthelper.utils;
-// import mango.icu.ULocale;
-// import mango.icu.UString;
-// import mango.icu.UBreakIterator;
-import  dwtx.dwtxhelper.BreakIterator;
+import dwtx.dwtxhelper.mangoicu.UBreakIterator;
 import tango.util.collection.ArraySeq;
 
 /**
@@ -723,7 +720,7 @@
         auto wb =  UBreakIterator.openLineIterator( ULocale.Default, getText() );
         scope(exit) wb.close();
         int cursor = 0;
-        for (int loc = wb.first(); loc !is UBreakIterator.DONE; loc = wb.next()) {
+        for (int loc = wb.first(); loc !is UBreakIterator.Done; loc = wb.next()) {
             if (loc is 0)
                 continue;
             String word = text.substring(cursor, loc);