Index: ogr/ogrsf_frmts/ili/iom/iom_utilities.cpp =================================================================== --- ogr/ogrsf_frmts/ili/iom/iom_utilities.cpp (révision 15504) +++ ogr/ogrsf_frmts/ili/iom/iom_utilities.cpp (copie de travail) @@ -168,33 +168,33 @@ */ char *iom_toUTF8(const XMLCh *src) { - unsigned int srcLen=XMLString::stringLen(src); - int destLen=srcLen+10; - char *dest; - dest=dbgnew char[destLen+1]; - unsigned int eaten; - unsigned int endDest; - endDest=utf8_transcoder->transcodeTo(src,srcLen,(unsigned char *)dest,destLen,eaten,XMLTranscoder::UnRep_RepChar); + XMLSize_t srcLen=XMLString::stringLen(src); + XMLSize_t destLen=srcLen+10; + XMLByte *dest; + dest=dbgnew XMLByte[destLen+1]; + XMLSize_t eaten; + XMLSize_t endDest; + endDest=utf8_transcoder->transcodeTo(src,srcLen,dest,destLen,eaten,XMLTranscoder::UnRep_RepChar); while(eatentranscodeTo(src,srcLen,(unsigned char *)dest,destLen,eaten,XMLTranscoder::UnRep_RepChar); + dest=dbgnew XMLByte[destLen+1]; + endDest=utf8_transcoder->transcodeTo(src,srcLen,dest,destLen,eaten,XMLTranscoder::UnRep_RepChar); } dest[endDest]=0; - return dest; + return (char*)dest; /* should be a unsigned char* == XMLByte* instead */ } /** transcode an utf8 encoded string to a xerces unicode one. */ XMLCh *iom_fromUTF8(const char *src) { - int srcLen=XMLString::stringLen(src); - int destLen=srcLen; + XMLSize_t srcLen=XMLString::stringLen(src); + XMLSize_t destLen=srcLen; XMLCh *dest=dbgnew XMLCh[destLen+1]; unsigned char *charSizes=dbgnew unsigned char[destLen]; - unsigned int eaten; - unsigned int endDest=utf8_transcoder->transcodeFrom((unsigned char *)src,srcLen,dest,destLen,eaten,charSizes); + XMLSize_t eaten; + XMLSize_t endDest=utf8_transcoder->transcodeFrom((const XMLByte *)src,srcLen,dest,destLen,eaten,charSizes); dest[endDest]=0; delete[] charSizes; return dest;