1

The Chinese of Win7, I use TAbZipper create a ZIP file, but the zip file on the operating system of the English, the file name of the zip file inside have become garbled.I use the Abbrevia5. How can I do it, in DelphiXE2.

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
Deming
  • 11
  • 1
  • Sounds like you are interpreting 1252 code page data as Chinese code page – David Heffernan Oct 15 '12 at 12:15
  • 2
    XE2 has built-in Zip unit, doesn't it ? – Arioch 'The Oct 15 '12 at 12:41
  • 1
    You can also try VclZip and 7-zip headers from progdigy.com or Jedi CodeLib – Arioch 'The Oct 15 '12 at 12:42
  • 1
    I'd second the suggestion to use the built-in ZIP library. It was introduced in XE and works well in my experience. – David Heffernan Oct 15 '12 at 13:47
  • Thanks for the votes of support everyone. This was asked in the Abbrevia forums as well, and I'm answering it there. – Zoë Peterson Oct 15 '12 at 16:40
  • @Craig Wouldn't you agree that if the out of the box tool does the job, then it's the best option? – David Heffernan Oct 15 '12 at 18:25
  • @David Yes, but you're assuming that another tool will do a better job just because it's different. Handling international filenames within zips in a cross-application compatible manner is extremely complex, and I know for a fact that, among Delphi libraries, Abbrevia's support is the most complete. I won't rule out a bug, and if one exists I can fix it easy enough, but the OP didn't provide enough information to verify that. If he uses Abbrevia to zip it but then Windows' built-in support to unzip it, the answer is just "You can't do that" because of limitations in Windows' implementation. – Zoë Peterson Oct 15 '12 at 18:42
  • @CraigPeterson I'm not assuming anything. If the built in lib doesn't get the job done then it's time to look for something that can. – David Heffernan Oct 15 '12 at 18:46
  • @David He already has (mostly) working code using Abbrevia. I can't speak to his implementation, but providing enough information to debug the issue (which he hasn't) and having me fix the bug (if one exists) is bound to be easier than learning a new library and rewriting the code, which may not fix the issue anyway. If he had been using System.Zip originally, would your first suggestion have been to swap out it too, or would you have suggested trying something like setting the UTF8Support property? – Zoë Peterson Oct 15 '12 at 19:02
  • @David Also, if I thought this was an obvious deficiency in Abbrevia, I'd say so. I've studied filename support in zip files extensively, and Abbrevia's implementation is the best I could come up with. Delphi's built-in support is trivial by comparison, because it doesn't handle a lot of cases. – Zoë Peterson Oct 15 '12 at 19:06
  • @Craig I'd always replace a 3rd party dependency with a built in library if the built in library did what I needed. Back in the day I used 3rd party libs for GIF, PNG, zlib and regex. I've removed all those dependencies. On the other hand, if built in ZIP doesn't do the job here, then the 3rd party lib that does wins. So, keep up the fine work!! – David Heffernan Oct 15 '12 at 19:15
  • i'd put random guess that 7-zip - given its russian origin - would take international support very seriously. OTOH Zip support is not their primary goal. – Arioch 'The Oct 15 '12 at 20:19

0 Answers0