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

Corrupted contedt when using utf-8 with Hebrew values in XML



   Thanks Scott

   First, I'm still running 1.23 on my production machine, while 1.24 on
   dev machine.

   Last week I switched to 1.24 on production, and had to go back to 1.23.


   I made some investigation, debug the code and found the place where the
   corruption occurred.

   It is in iconvdyn() procedure.

   Output buffer is not large enough to get the converted string.

   In 1.23, output buffer size was twice then input buffer length.

   In 1.24, new algorithm took place, but it is wrong.

   Yes you can add a chunk of 64K to output buffer each iteration, but do
   not play with pointers of input and output buffer.

   Since in conversion from single byte code page to multi bytes code
   page, you never know where conversion is stopped.

   So just increase output buffer and reconvert the whole thing from the
   beginning every time, until finished OK.


   Mike, yes , it is the same program runs twice. One with 1.23 version of
   HTTPAPIR4 *SRVPGM, the other with 1.24 version.


   Regards

   Boaz Mermelstein

   3/21 Hershko Avraham st. |  Rehovot   |  Israel

   Phone: +972 8 9458690  |  Mobile:+972 54 4441 891  |  Fax: +972 151 54
   4441 891

   http://www.smbt.co.il
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------