]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/unesctrn.cpp
ICU-551.51.4.tar.gz
[apple/icu.git] / icuSources / i18n / unesctrn.cpp
index c3d848d06e9b45e56e3ccc06cc95e688fb8c6d6f..c950362c413a7e2be4a000d31571c49d4c3e8649 100644 (file)
@@ -1,6 +1,6 @@
 /*
  **********************************************************************
- *   Copyright (c) 2001-2008, International Business Machines
+ *   Copyright (c) 2001-2011, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  **********************************************************************
  *   Date        Name        Description
@@ -13,6 +13,7 @@
 #if !UCONFIG_NO_TRANSLITERATION
 
 #include "unicode/uchar.h"
+#include "unicode/utf16.h"
 #include "unesctrn.h"
 #include "util.h"
 
@@ -229,7 +230,7 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi
                     if (digit < 0) {
                         break;
                     }
-                    s += UTF_CHAR_LENGTH(ch);
+                    s += U16_LENGTH(ch);
                     u = (u * radix) + digit;
                     if (++digitCount == maxDigits) {
                         break;
@@ -273,7 +274,7 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi
         }
 
         if (start < limit) {
-            start += UTF_CHAR_LENGTH(text.char32At(start));
+            start += U16_LENGTH(text.char32At(start));
         }
     }