login about faq

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.

asked Apr 03 '13 at 12:33

roan98dk's gravatar image



answered Apr 08 '13 at 12:05

chilkat's gravatar image

chilkat ♦♦

Unfortunately there are too many other changed in the pre-release for me to easily test it. I would have to make too many other changes only to test this or create a simple console application. I am considering going with the second alternative so that I always have an almost empty project, where I can test these types of changes.

(Apr 09 '13 at 08:26) roan98dk

Hmm, I decided to try it anyway in my project, but while testing I notice that CkZipCrc::FileCrc() suddenly returns 0. Has this class been deprecated in favor of CkCrypt2?

(Apr 09 '13 at 09:04) roan98dk

No, this was a temporary error introduced in the pre-release that has not yet been released. I made the fix and will upload a new build later and will post here when it's ready.

(Apr 09 '13 at 13:03) chilkat ♦♦

I uploaded the new builds to the same URL as before. This fixes the FileCrc problem..

(Apr 10 '13 at 08:49) chilkat ♦♦

I have responded with an answer only to format code. It would be nice if comments also supported a little bit of formatting.

(Apr 10 '13 at 09:38) roan98dk

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">

answered Apr 10 '13 at 09:37

roan98dk's gravatar image


The fix for the GetEntryByName problem has been uploaded to the same URL.

Note: This is a problem that existed only in the pre-release of the new version (v9.4.1). These issues are due to the fact that significant internal work on the Zip class has taken place, namely to support ZipX and to eliminate the need for temp files, as well as certain performance improvements -- such as when opening large zip archives.

(Apr 10 '13 at 11:29) chilkat ♦♦

Ok, I will wait to test this as well as SendRate callback in CkHttpProgress until 9.4.1 is close to completion.

(Apr 10 '13 at 11:57) roan98dk

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?


answered Jul 09 '13 at 12:24

ixm7's gravatar image


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


answered Jul 09 '13 at 14:41

ixm7's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Apr 03 '13 at 12:33

Seen: 2,506 times

Last updated: Jul 09 '13 at 14:41

powered by OSQA