X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..340931cb2e044a2141d11567dd0f782524e32994:/icuSources/tools/toolutil/xmlparser.cpp diff --git a/icuSources/tools/toolutil/xmlparser.cpp b/icuSources/tools/toolutil/xmlparser.cpp index 134fdcf8..a9650cc5 100644 --- a/icuSources/tools/toolutil/xmlparser.cpp +++ b/icuSources/tools/toolutil/xmlparser.cpp @@ -1,3 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * @@ -6,7 +8,7 @@ * ******************************************************************************* * file name: xmlparser.cpp -* encoding: US-ASCII +* encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * @@ -207,7 +209,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { goto exit; } - buffer=src.getBuffer(bytesLength); + buffer=toUCharPtr(src.getBuffer(bytesLength)); if(buffer==NULL) { // unexpected failure to reserve some string capacity errorCode=U_MEMORY_ALLOCATION_ERROR; @@ -276,7 +278,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { pb=bytes; for(;;) { length=src.length(); - buffer=src.getBuffer(capacity); + buffer=toUCharPtr(src.getBuffer(capacity)); if(buffer==NULL) { // unexpected failure to reserve some string capacity errorCode=U_MEMORY_ALLOCATION_ERROR; @@ -311,7 +313,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) { // reached end of file, convert once more to flush the converter flush=TRUE; } - }; + } exit: ucnv_close(cnv);