{"action":"created","comment":{"url":"https://api.github.com/repos/gradle/gradle/pulls/comments/36445786","id":36445786,"diff_hunk":"@@ -104,6 +104,52 @@ class ZipIntegrationTest extends AbstractIntegrationSpec {\n         theZip.hasDescendants('file1.txt', 'file2.txt')\n     }\n \n+    def zipTaskUseUTF8Encoding() {\n+        given:\n+        def filename = '中文'\n+        def encoding = 'UTF-8'\n+        createTestFilesWithEncoding(filename, encoding)\n+        buildFile << \"\"\"\n+            task zip(type: Zip) {\n+                from 'dir1'\n+                from 'dir2'\n+                from 'dir3'\n+                destinationDir = buildDir\n+                archiveName = 'test.zip'\n+                encoding = '$encoding'\n+            }\n+            \"\"\"\n+        when:\n+        run 'zip'\n+\n+        then:\n+        def theZip = new ZipTestFixture(file('build/test.zip'), encoding)\n+        theZip.hasDescendants(\"${filename}1.txt\", \"${filename}2.txt\", \"${filename}3.txt\")\n+    }\n+\n+    def zipTaskUseISOEncoding() {\n+        given:\n+        def filename = 'ÈÇ'\n+        def encoding = 'ISO-8859-1'\n+        createTestFilesWithEncoding(filename, encoding)\n+        buildFile << \"\"\"\n+            task zip(type: Zip) {\n+                from 'dir1'\n+                from 'dir2'\n+                from 'dir3'\n+                destinationDir = buildDir\n+                archiveName = 'test.zip'\n+                encoding = '$encoding'\n+            }\n+            \"\"\"\n+        when:\n+        run 'zip'\n+\n+        then:\n+        def theZip = new ZipTestFixture(file('build/test.zip'), encoding)\n+        theZip.hasDescendants(\"${filename}1.txt\", \"${filename}2.txt\", \"${filename}3.txt\")\n+    }\n+","path":"subprojects/core/src/integTest/groovy/org/gradle/api/tasks/bundling/ZipIntegrationTest.groovy","position":49,"original_position":49,"commit_id":"38e484f1c813f54b9a2298ebfc6dbfb43bb03d5d","original_commit_id":"38e484f1c813f54b9a2298ebfc6dbfb43bb03d5d","user":{"login":"bigdaz","id":179734,"avatar_url":"https://avatars.githubusercontent.com/u/179734?v=3","gravatar_id":"","url":"https://api.github.com/users/bigdaz","html_url":"https://github.com/bigdaz","followers_url":"https://api.github.com/users/bigdaz/followers","following_url":"https://api.github.com/users/bigdaz/following{/other_user}","gists_url":"https://api.github.com/users/bigdaz/gists{/gist_id}","starred_url":"https://api.github.com/users/bigdaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigdaz/subscriptions","organizations_url":"https://api.github.com/users/bigdaz/orgs","repos_url":"https://api.github.com/users/bigdaz/repos","events_url":"https://api.github.com/users/bigdaz/events{/privacy}","received_events_url":"https://api.github.com/users/bigdaz/received_events","type":"User","site_admin":false},"body":"Should use Spock `@Unroll` here to avoid test duplication. Would also be useful to have a test explicitly setting `null` encoding.","created_at":"2015-08-06T18:06:59Z","updated_at":"2015-08-06T18:06:59Z","html_url":"https://github.com/gradle/gradle/pull/405#discussion_r36445786","pull_request_url":"https://api.github.com/repos/gradle/gradle/pulls/405","_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments/36445786"},"html":{"href":"https://github.com/gradle/gradle/pull/405#discussion_r36445786"},"pull_request":{"href":"https://api.github.com/repos/gradle/gradle/pulls/405"}}},"pull_request":{"url":"https://api.github.com/repos/gradle/gradle/pulls/405","id":29382727,"html_url":"https://github.com/gradle/gradle/pull/405","diff_url":"https://github.com/gradle/gradle/pull/405.diff","patch_url":"https://github.com/gradle/gradle/pull/405.patch","issue_url":"https://api.github.com/repos/gradle/gradle/issues/405","number":405,"state":"open","locked":false,"title":"Add encoding property for zip task","user":{"login":"AlphaHinex","id":968283,"avatar_url":"https://avatars.githubusercontent.com/u/968283?v=3","gravatar_id":"","url":"https://api.github.com/users/AlphaHinex","html_url":"https://github.com/AlphaHinex","followers_url":"https://api.github.com/users/AlphaHinex/followers","following_url":"https://api.github.com/users/AlphaHinex/following{/other_user}","gists_url":"https://api.github.com/users/AlphaHinex/gists{/gist_id}","starred_url":"https://api.github.com/users/AlphaHinex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlphaHinex/subscriptions","organizations_url":"https://api.github.com/users/AlphaHinex/orgs","repos_url":"https://api.github.com/users/AlphaHinex/repos","events_url":"https://api.github.com/users/AlphaHinex/events{/privacy}","received_events_url":"https://api.github.com/users/AlphaHinex/received_events","type":"User","site_admin":false},"body":"This pr could fix problems such as chinese characters in file name change to garbled characters after using zip type task","created_at":"2015-02-16T15:56:03Z","updated_at":"2015-08-06T18:06:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"970811b4161b533d829ad5b9dfb3f9b33aa0ba0a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gradle/gradle/pulls/405/commits","review_comments_url":"https://api.github.com/repos/gradle/gradle/pulls/405/comments","review_comment_url":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gradle/gradle/issues/405/comments","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/38e484f1c813f54b9a2298ebfc6dbfb43bb03d5d","head":{"label":"AlphaHinex:master","ref":"master","sha":"38e484f1c813f54b9a2298ebfc6dbfb43bb03d5d","user":{"login":"AlphaHinex","id":968283,"avatar_url":"https://avatars.githubusercontent.com/u/968283?v=3","gravatar_id":"","url":"https://api.github.com/users/AlphaHinex","html_url":"https://github.com/AlphaHinex","followers_url":"https://api.github.com/users/AlphaHinex/followers","following_url":"https://api.github.com/users/AlphaHinex/following{/other_user}","gists_url":"https://api.github.com/users/AlphaHinex/gists{/gist_id}","starred_url":"https://api.github.com/users/AlphaHinex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlphaHinex/subscriptions","organizations_url":"https://api.github.com/users/AlphaHinex/orgs","repos_url":"https://api.github.com/users/AlphaHinex/repos","events_url":"https://api.github.com/users/AlphaHinex/events{/privacy}","received_events_url":"https://api.github.com/users/AlphaHinex/received_events","type":"User","site_admin":false},"repo":{"id":30814927,"name":"gradle","full_name":"AlphaHinex/gradle","owner":{"login":"AlphaHinex","id":968283,"avatar_url":"https://avatars.githubusercontent.com/u/968283?v=3","gravatar_id":"","url":"https://api.github.com/users/AlphaHinex","html_url":"https://github.com/AlphaHinex","followers_url":"https://api.github.com/users/AlphaHinex/followers","following_url":"https://api.github.com/users/AlphaHinex/following{/other_user}","gists_url":"https://api.github.com/users/AlphaHinex/gists{/gist_id}","starred_url":"https://api.github.com/users/AlphaHinex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlphaHinex/subscriptions","organizations_url":"https://api.github.com/users/AlphaHinex/orgs","repos_url":"https://api.github.com/users/AlphaHinex/repos","events_url":"https://api.github.com/users/AlphaHinex/events{/privacy}","received_events_url":"https://api.github.com/users/AlphaHinex/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlphaHinex/gradle","description":"A powerful build system for the JVM","fork":true,"url":"https://api.github.com/repos/AlphaHinex/gradle","forks_url":"https://api.github.com/repos/AlphaHinex/gradle/forks","keys_url":"https://api.github.com/repos/AlphaHinex/gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlphaHinex/gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlphaHinex/gradle/teams","hooks_url":"https://api.github.com/repos/AlphaHinex/gradle/hooks","issue_events_url":"https://api.github.com/repos/AlphaHinex/gradle/issues/events{/number}","events_url":"https://api.github.com/repos/AlphaHinex/gradle/events","assignees_url":"https://api.github.com/repos/AlphaHinex/gradle/assignees{/user}","branches_url":"https://api.github.com/repos/AlphaHinex/gradle/branches{/branch}","tags_url":"https://api.github.com/repos/AlphaHinex/gradle/tags","blobs_url":"https://api.github.com/repos/AlphaHinex/gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlphaHinex/gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlphaHinex/gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlphaHinex/gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlphaHinex/gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/AlphaHinex/gradle/languages","stargazers_url":"https://api.github.com/repos/AlphaHinex/gradle/stargazers","contributors_url":"https://api.github.com/repos/AlphaHinex/gradle/contributors","subscribers_url":"https://api.github.com/repos/AlphaHinex/gradle/subscribers","subscription_url":"https://api.github.com/repos/AlphaHinex/gradle/subscription","commits_url":"https://api.github.com/repos/AlphaHinex/gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlphaHinex/gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlphaHinex/gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlphaHinex/gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlphaHinex/gradle/contents/{+path}","compare_url":"https://api.github.com/repos/AlphaHinex/gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlphaHinex/gradle/merges","archive_url":"https://api.github.com/repos/AlphaHinex/gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlphaHinex/gradle/downloads","issues_url":"https://api.github.com/repos/AlphaHinex/gradle/issues{/number}","pulls_url":"https://api.github.com/repos/AlphaHinex/gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/AlphaHinex/gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/AlphaHinex/gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlphaHinex/gradle/labels{/name}","releases_url":"https://api.github.com/repos/AlphaHinex/gradle/releases{/id}","created_at":"2015-02-15T01:55:35Z","updated_at":"2015-02-16T16:31:25Z","pushed_at":"2015-06-17T13:57:51Z","git_url":"git://github.com/AlphaHinex/gradle.git","ssh_url":"git@github.com:AlphaHinex/gradle.git","clone_url":"https://github.com/AlphaHinex/gradle.git","svn_url":"https://github.com/AlphaHinex/gradle","homepage":"www.gradle.org","size":104080,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gradle:master","ref":"master","sha":"bcdcb875972743fe72a82464b0fe1046f4cf2373","user":{"login":"gradle","id":124156,"avatar_url":"https://avatars.githubusercontent.com/u/124156?v=3","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"repo":{"id":302322,"name":"gradle","full_name":"gradle/gradle","owner":{"login":"gradle","id":124156,"avatar_url":"https://avatars.githubusercontent.com/u/124156?v=3","gravatar_id":"","url":"https://api.github.com/users/gradle","html_url":"https://github.com/gradle","followers_url":"https://api.github.com/users/gradle/followers","following_url":"https://api.github.com/users/gradle/following{/other_user}","gists_url":"https://api.github.com/users/gradle/gists{/gist_id}","starred_url":"https://api.github.com/users/gradle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gradle/subscriptions","organizations_url":"https://api.github.com/users/gradle/orgs","repos_url":"https://api.github.com/users/gradle/repos","events_url":"https://api.github.com/users/gradle/events{/privacy}","received_events_url":"https://api.github.com/users/gradle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gradle/gradle","description":"A powerful build system for the JVM","fork":false,"url":"https://api.github.com/repos/gradle/gradle","forks_url":"https://api.github.com/repos/gradle/gradle/forks","keys_url":"https://api.github.com/repos/gradle/gradle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gradle/gradle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gradle/gradle/teams","hooks_url":"https://api.github.com/repos/gradle/gradle/hooks","issue_events_url":"https://api.github.com/repos/gradle/gradle/issues/events{/number}","events_url":"https://api.github.com/repos/gradle/gradle/events","assignees_url":"https://api.github.com/repos/gradle/gradle/assignees{/user}","branches_url":"https://api.github.com/repos/gradle/gradle/branches{/branch}","tags_url":"https://api.github.com/repos/gradle/gradle/tags","blobs_url":"https://api.github.com/repos/gradle/gradle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gradle/gradle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gradle/gradle/git/refs{/sha}","trees_url":"https://api.github.com/repos/gradle/gradle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gradle/gradle/statuses/{sha}","languages_url":"https://api.github.com/repos/gradle/gradle/languages","stargazers_url":"https://api.github.com/repos/gradle/gradle/stargazers","contributors_url":"https://api.github.com/repos/gradle/gradle/contributors","subscribers_url":"https://api.github.com/repos/gradle/gradle/subscribers","subscription_url":"https://api.github.com/repos/gradle/gradle/subscription","commits_url":"https://api.github.com/repos/gradle/gradle/commits{/sha}","git_commits_url":"https://api.github.com/repos/gradle/gradle/git/commits{/sha}","comments_url":"https://api.github.com/repos/gradle/gradle/comments{/number}","issue_comment_url":"https://api.github.com/repos/gradle/gradle/issues/comments{/number}","contents_url":"https://api.github.com/repos/gradle/gradle/contents/{+path}","compare_url":"https://api.github.com/repos/gradle/gradle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gradle/gradle/merges","archive_url":"https://api.github.com/repos/gradle/gradle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gradle/gradle/downloads","issues_url":"https://api.github.com/repos/gradle/gradle/issues{/number}","pulls_url":"https://api.github.com/repos/gradle/gradle/pulls{/number}","milestones_url":"https://api.github.com/repos/gradle/gradle/milestones{/number}","notifications_url":"https://api.github.com/repos/gradle/gradle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gradle/gradle/labels{/name}","releases_url":"https://api.github.com/repos/gradle/gradle/releases{/id}","created_at":"2009-09-09T18:27:19Z","updated_at":"2015-08-06T13:53:10Z","pushed_at":"2015-08-06T18:00:23Z","git_url":"git://github.com/gradle/gradle.git","ssh_url":"git@github.com:gradle/gradle.git","clone_url":"https://github.com/gradle/gradle.git","svn_url":"https://github.com/gradle/gradle","homepage":"www.gradle.org","size":595407,"stargazers_count":2541,"watchers_count":2541,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":1044,"mirror_url":null,"open_issues_count":38,"forks":1044,"open_issues":38,"watchers":2541,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gradle/gradle/pulls/405"},"html":{"href":"https://github.com/gradle/gradle/pull/405"},"issue":{"href":"https://api.github.com/repos/gradle/gradle/issues/405"},"comments":{"href":"https://api.github.com/repos/gradle/gradle/issues/405/comments"},"review_comments":{"href":"https://api.github.com/repos/gradle/gradle/pulls/405/comments"},"review_comment":{"href":"https://api.github.com/repos/gradle/gradle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gradle/gradle/pulls/405/commits"},"statuses":{"href":"https://api.github.com/repos/gradle/gradle/statuses/38e484f1c813f54b9a2298ebfc6dbfb43bb03d5d"}}}}