+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
-* Copyright (C) 2001-2010, International Business Machines
+* Copyright (C) 2001-2011, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: casetrn.cpp
-* encoding: US-ASCII
+* encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
#include "unicode/uchar.h"
#include "unicode/ustring.h"
+#include "unicode/utf.h"
+#include "unicode/utf16.h"
#include "tolowtrn.h"
#include "ucase.h"
#include "cpputils.h"
*/
CaseMapTransliterator::CaseMapTransliterator(const UnicodeString &id, UCaseMapFull *map) :
Transliterator(id, 0),
- fCsp(ucase_getSingleton()),
fMap(map)
{
// TODO test incremental mode with context-sensitive text (e.g. greek sigma)
*/
CaseMapTransliterator::CaseMapTransliterator(const CaseMapTransliterator& o) :
Transliterator(o),
- fCsp(o.fCsp), fMap(o.fMap)
+ fMap(o.fMap)
{
}
*/
/*CaseMapTransliterator& CaseMapTransliterator::operator=(const CaseMapTransliterator& o) {
Transliterator::operator=(o);
- fCsp = o.fCsp;
fMap = o.fMap;
return *this;
}*/
UnicodeString tmp;
const UChar *s;
UChar32 c;
- int32_t textPos, delta, result, locCache=0;
+ int32_t textPos, delta, result;
for(textPos=offsets.start; textPos<offsets.limit;) {
csc.cpStart=textPos;
c=text.char32At(textPos);
csc.cpLimit=textPos+=U16_LENGTH(c);
- result=fMap(fCsp, c, utrans_rep_caseContextIterator, &csc, &s, "", &locCache);
+ result=fMap(c, utrans_rep_caseContextIterator, &csc, &s, UCASE_LOC_ROOT);
if(csc.b1 && isIncremental) {
// fMap() tried to look beyond the context limit