--- dclib/core/cxml.cpp.orig Thu Aug 12 10:32:06 2004 +++ dclib/core/cxml.cpp Thu Dec 2 01:08:00 2004 @@ -145,12 +145,12 @@ res = UTF8Toisolat1( b, &outlen, (unsigned char*)s, &inlen ); - if ( res == -2 ) + if ( res >= 0 ) + r = (char*)b; + else if ( res == -2 ) printf("UTF8Toisolat1 transcoding fail: '%s'\n",s); else if ( res == -1 ) printf("UTF8Toisolat1 fail: '%s'\n",s); - else if ( res == 0 ) - r = (char*)b; else printf("CXml::xml_UTF8Toisolat1 error %d\n",res); @@ -178,10 +178,12 @@ res = isolat1ToUTF8( b, &outlen, (unsigned char*)s, &inlen ); - if ( res == -1 ) + if ( res >= 0 ) + r = (char*)b; + else if ( res == -1 ) printf("isolat1ToUTF8 fail: '%s'\n",s); - else if ( res == 0 ) - r = (char*)b; + else + printf("CXml::xml_isolat1ToUTF8 error %d\n",res); free(b);