updatefile with Encoding

Feb 8, 2010 at 8:31 AM

my VB.NET program

'first time

Using Zip0 As ZipFile = ZipFile.Read("test.zip", System.Text.Encoding.GetEncoding("shift_jis"))
          Zip0.UpdateFile("日本語.txt")
          Zip0.Save()
End Using

in test.zip file the file name is OK

'second time

Using Zip0 As ZipFile = ZipFile.Read("test.zip", System.Text.Encoding.GetEncoding("shift_jis"))
          Zip0.UpdateFile("日本語テスト.txt")
          Zip0.Save()
End Using

in test.zip file the first filename is bad, the second file name is ok

can you help me. thanks

 

Coordinator
Feb 9, 2010 at 7:15 PM

This seems to be a problem in the library.

I've reproduced the problem here.  I will look into it further and let you know what I find.

 

Coordinator
Feb 9, 2010 at 7:28 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Feb 9, 2010 at 9:44 PM

This is a bug in the DotNetZip library.

I've made a very simple fix; I am now testing the change.  I will post an updated release when the tests complete successfully.  I'll also notify you here on this thread.

Thanks for reporting this, and thanks for helping to improve DotNetZip!

 

 

Feb 9, 2010 at 11:08 PM
thanks you very much.
In Japen because the error . many program can not using Dotnotzip.
Sample
$B4{B8$N=q8K$N99?7$KF|K\8l$O;H$($J$$!)(B <- by UpdateFile you can use JP.
wait you good news.
thanks.



From: [email removed]
To: [email removed]
Date: Tue, 9 Feb 2010 12:16:00 -0800
Subject: Re: updatefile with Encoding [DotNetZip:83483]

From: Cheeso
This seems to be a problem in the library.
I've reproduced the problem here. I will look into it further and let you know what I find.

Read the full discussion online.
To add a post to this discussion, reply to this email (DotNetZip@discussions.codeplex.com)
To start a new discussion for this project, email DotNetZip@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


$B%a!$NL5NA%a!<%k$b%W%m%P%$%@!<%a!<%k$b!#(B $B%a!<%k$r0l3g%A%'%C%/$7$?$$J}$O!"$3$A$i!#(B
Feb 9, 2010 at 11:16 PM

thank you help

 update has error.  removentry has same error too.

 by

http://wiki.dobon.net/index.php?.NET%A5%D7%A5%ED%A5%B0%A5%E9%A5%DF%A5%F3%A5%B0%B8%A6%B5%E6%2F95

Using zip As Ionic.Zip.ZipFile = Ionic.Zip.ZipFile.Read("C:\test.zip",System.Text.Encoding.GetEncoding("shift_jis"))
    'readme.txtがあれば削除する
    Dim entry As Ionic.Zip.ZipEntry = zip("日本語.txt")
    If entry IsNot Nothing Then
        zip.RemoveEntry(entry)
    End If

    'または、次のようにもできる
    Dim removeName As String = "日本語テスト.txt"
    If zip.EntryFileNames.Contains(removeName) Then
        zip.RemoveEntry(removeName)
    End If

    '拡張子が.docのファイルを削除する
    zip.RemoveSelectedEntries("日本語テスト*.doc")
    '保存する
    zip.Save()
End Using

Coordinator
Feb 10, 2010 at 1:44 AM

Yes, I understand.  The fix I have made should correct the problem with UpdateFile() as well as with RemoveEntry().

This fix is now available in the updated release, v1.9.1.3.  http://dotnetzip.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27890

Please test it and let me know if it works for you.

 

Feb 10, 2010 at 2:57 AM
thanks very much.
I shell test the new library today. andl send the test result to you.

thanks you again.


From: [email removed]
To: [email removed]
Date: Tue, 9 Feb 2010 18:44:40 -0800
Subject: Re: updatefile with Encoding [DotNetZip:83483]

From: Cheeso
Yes, I understand. The fix I have made should correct the problem with UpdateFile() as well as with RemoveEntry().
This fix is now available in the updated release, v1.9.1.3. http://dotnetzip.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27890
Please test it and let me know if it works for you.

Read the full discussion online.
To add a post to this discussion, reply to this email (DotNetZip@discussions.codeplex.com)
To start a new discussion for this project, email DotNetZip@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


USB$B%a%b%jBe$o$j$K$*;H$$$/$@$5$$!#L5NA$G;H$($k(B25GB$B!#(B SkyDrive$B$r:#$9$0BN83(B
Feb 10, 2010 at 6:32 AM

tanks you very much.

I tested the [updatefile] . there is not error.

tanks you again.

Coordinator
Feb 10, 2010 at 12:30 PM

Ah, very good.

Thank you for the confirmation. and good luck.

Feb 10, 2010 at 9:30 PM

In source code on line I think that you append the sample of the [updatefile],[removefile] command about  chinese or japanese Encoding.

I can help you to test the source code .    I am chinese. now working in Japan.

thank you very much.  

 

Coordinator
Feb 10, 2010 at 11:50 PM

Thanks very much for the offer of help.

I don't know exactly what you are offering to do.    And I don't know what you mean about "append the sample". 

What would be helpful is for you to download the source distribution and then build it, and run the tests. It would be nice to do this on a computer that does not use English as the main language - a system for which the default encoding is 932 (shift_jis) or 950 (big 5).  Would you be willing to do that?