Archived Forum Post

Index of archived forum posts


unzipToString skips the last character in the string?

Jul 09 '13 at 14:41

While using CkZip and CkZipEntry's unzipToString to open the docProps/custom.xml from a Microsoft Word document, I noticed that the last character in the Xml is missing for some reason.

The code is somewhat like this:

CkZipEntry *zipentry = zip.GetEntryByName(_T("docProps/custom.xml"));
const char *charXml = zipentry->unzipToString(0, _T("utf-8"));

The character that is missing is the ending ">" of the "<Properties>" node.

My environment is VC++ 11 and Chilkat v4 (obviously) in win32 mode.


Please check to see if this new build contains the same problem:




Now I am suddenly faced with another problem while getting the ZipEntry to process:

    DllDate: Apr 10 2013
    UnlockPrefix: XXXXXXXX
    Username: XXXX:XXXXXX
    Architecture: Little Endian; 32-bit
    VerboseLogging: 0
    filename: docProps/custom.xml
    File not found in zip archive

The code worked fine in 9.4.0:

CkZipEntry *entry = zip.GetEntryByName(_T("docProps/custom.xml"))

The entry above is null/empty, but it does exist in the zip file. Here is the zip content as XML:

    <dir name="_rels">
    <dir name="word">
        <dir name="_rels">
        <dir name="theme">
        <dir name="media">
    <dir name="docProps">


I'm facing the same issue: unzipToString is missing the last character.

But the download links above are not working. Where can I get the fixed version for .NET 4.0?


Looks like Chilkat just released the newer version and that's why the links above no longer work. All is well :o)