Re: [xml] isoLat1toUTF8 conv error



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

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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