Re: [xml] isoLat1toUTF8 conv error



Thanks for this very helpfull answer Daniel.
I put the minimum to not bother the list with thousand lines of code. I have understood, it's my fault ( I never doubt about that ),
and so I will debug it on my own.

Have a good day,

_____________________________________________
Remy HAREL          -        Teamlog        |
____________________________________________|
Linux registered user #224740               |
France Telecom Recherche & Developpement    |
____________________________________________| __________________@ http://www.chezrem.org @|




Daniel Veillard wrote:

On Tue, May 24, 2005 at 12:20:52PM +0200, Remy HAREL wrote:
...
  isolat1ToUTF8(texte_tmp, &outlen, ( const unsigned char*)texte, &inlen);
...

 Not checking the value returned by the function, bad :-(
 Incomplete non-compilable code, bad :-(
 And outlen and inlen are both IN and OUT parameters.

outlen seems initialized to 0. Did you used a debugger to check what was the content of the buffer after the call ? If no please do !
I would appreciate if you didn't posted as if the code was in error and
provide fully contained examples which pass compilation with gcc -Wall
without warnings. isolat1ToUTF8 is exactly like an iconv function except
it has no context parameter since the conversion is stateless.

Daniel




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