]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/uni2name.cpp
ICU-64260.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / uni2name.cpp
index dcc49d758ffd6bac528770eddc2f7548c79a54bc..a56f1a61817ad22c891a57be0af4686916eb1571 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 **********************************************************************
-*   Copyright (C) 2001-2004, International Business Machines
+*   Copyright (C) 2001-2011, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 *   Date        Name        Description
@@ -14,6 +16,7 @@
 
 #include "unicode/unifilt.h"
 #include "unicode/uchar.h"
+#include "unicode/utf16.h"
 #include "uni2name.h"
 #include "cstring.h"
 #include "cmemory.h"
@@ -48,11 +51,11 @@ UnicodeNameTransliterator::UnicodeNameTransliterator(const UnicodeNameTransliter
 /**
  * Assignment operator.
  */
-UnicodeNameTransliterator& UnicodeNameTransliterator::operator=(
+/*UnicodeNameTransliterator& UnicodeNameTransliterator::operator=(
                              const UnicodeNameTransliterator& o) {
     Transliterator::operator=(o);
     return *this;
-}
+}*/
 
 /**
  * Transliterator API.
@@ -94,7 +97,7 @@ void UnicodeNameTransliterator::handleTransliterate(Replaceable& text, UTransPos
 
     while (cursor < limit) {
         UChar32 c = text.char32At(cursor);
-        int32_t clen = UTF_CHAR_LENGTH(c);
+        int32_t clen = U16_LENGTH(c);
         status = U_ZERO_ERROR;
         if ((len = u_charName(c, U_EXTENDED_CHAR_NAME, buf, maxLen, &status)) >0 && !U_FAILURE(status)) {
             str.truncate(OPEN_DELIM_LEN);