--- parser3/src/main/pa_charset.C 2016/09/21 12:49:25 1.104 +++ parser3/src/main/pa_charset.C 2017/11/15 22:48:58 1.108 @@ -1,7 +1,7 @@ /** @file Parser: Charset connection implementation. - Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexander Petrosyan(http://paf.design.ru) */ @@ -11,7 +11,7 @@ // we are using some pcre_internal.h stuff as well #include "../lib/pcre/pa_pcre_internal.h" -volatile const char * IDENT_PA_CHARSET_C="$Id: pa_charset.C,v 1.104 2016/09/21 12:49:25 moko Exp $" IDENT_PA_CHARSET_H; +volatile const char * IDENT_PA_CHARSET_C="$Id: pa_charset.C,v 1.108 2017/11/15 22:48:58 moko Exp $" IDENT_PA_CHARSET_H; #ifdef XML #include "libxml/encoding.h" @@ -211,9 +211,6 @@ static int sort_cmp_Trans_rec_intCh(cons void Charset::sort_ToTable() { qsort(tables.toTable, tables.toTableSize, sizeof(*tables.toTable), sort_cmp_Trans_rec_intCh); - //FILE *f=fopen("c:\\temp\\a", "wb"); - //fwrite(tables.toTable, tables.toTableSize, sizeof(*tables.toTable), f); - //fclose(f); } // @todo: precache for spedup searching @@ -1065,7 +1062,7 @@ void Charset::addEncoding(char *name_cst if(handlers_count==MAX_CHARSETS) throw Exception(0, 0, "already allocated %d handlers, no space for new encoding '%s'", MAX_CHARSETS, name_cstr); - xmlCharEncodingHandler* handler=new xmlCharEncodingHandler; + xmlCharEncodingHandler* handler=new(PointerGC) xmlCharEncodingHandler; { handler->name=name_cstr; handler->input=inputFuncs[handlers_count]; @@ -1221,7 +1218,7 @@ size_t getUTF8CharPos(const XMLByte* src } // scan till end but position in bytes still too low - throw Exception(0, 0, "Error convertion byte pos to char pos"); + throw Exception(0, 0, "Error conversion byte pos to char pos"); } size_t lengthUTF8(const XMLByte* srcBegin, const XMLByte* srcEnd){