[xml] xmlOutputBufferWrite not working with an encoder that is not UTF-8



Hi,

I was using libxml xmlOutputBufferWrite function, but I found out that when the encoder is not UTF-8, the function doesn't work. I wrote my own function similar to libxml's one, excepted that I removed the following two lines of code:

 /*   if ((out->buffer->use < MINLEN) && (chunk == len)) goto done; */

and

 /* if ((nbchars < MINLEN) && (len <= 0)) goto done; */

Without those two lines, the function works well even if encoder is not UTF-8.

Can someone tell me why these goto instructions are needed ? Or if I missed something ?

Thanks a lot.

Frank




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]