{"action":"created","comment":{"url":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/comments/141590392","pull_request_review_id":65826124,"id":141590392,"diff_hunk":"@@ -370,3 +372,83 @@ def demodify(m):\n         return ret.decode('utf-7').encode('utf-8')\n     except (UnicodeDecodeError, UnicodeEncodeError):\n         return name\n+\n+# Functionality to convert folder names encoded in IMAP_utf_7 to utf_8.\n+# This is achieved by defining 'imap4_utf_7' as a proper encoding scheme.\n+# Original code by (https://www.blogger.com/profile/16648963337079496096), from","path":"offlineimap/imaputil.py","position":16,"original_position":16,"commit_id":"83490c636a59994a5d39a3a608c48f4cbdf2d440","original_commit_id":"8691dd5962e8be7bd63ce613dae037d0c1197ec2","user":{"login":"uliska","id":1812148,"avatar_url":"https://avatars2.githubusercontent.com/u/1812148?v=4","gravatar_id":"","url":"https://api.github.com/users/uliska","html_url":"https://github.com/uliska","followers_url":"https://api.github.com/users/uliska/followers","following_url":"https://api.github.com/users/uliska/following{/other_user}","gists_url":"https://api.github.com/users/uliska/gists{/gist_id}","starred_url":"https://api.github.com/users/uliska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uliska/subscriptions","organizations_url":"https://api.github.com/users/uliska/orgs","repos_url":"https://api.github.com/users/uliska/repos","events_url":"https://api.github.com/users/uliska/events{/privacy}","received_events_url":"https://api.github.com/users/uliska/received_events","type":"User","site_admin":false},"body":"Somehow this comment got lost during reshaping of the branch:\r\nhttp://piao-tech.blogspot.com/2010/03/get-offlineimap-working-with-non-ascii.html?showComment=1316041409339#c669880170006851138\r\nindicates to me that the original author of this code expects it to be incorporated into offlineIMAP and therefore implicitly agrees to put it under its license.","created_at":"2017-09-28T11:17:41Z","updated_at":"2017-09-28T11:17:41Z","html_url":"https://github.com/OfflineIMAP/offlineimap/pull/498#discussion_r141590392","pull_request_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/498","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/comments/141590392"},"html":{"href":"https://github.com/OfflineIMAP/offlineimap/pull/498#discussion_r141590392"},"pull_request":{"href":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/498"}}},"pull_request":{"url":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/498","id":143619218,"html_url":"https://github.com/OfflineIMAP/offlineimap/pull/498","diff_url":"https://github.com/OfflineIMAP/offlineimap/pull/498.diff","patch_url":"https://github.com/OfflineIMAP/offlineimap/pull/498.patch","issue_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/498","number":498,"state":"open","locked":false,"title":"Add 'utf8foldernames' account option","user":{"login":"uliska","id":1812148,"avatar_url":"https://avatars2.githubusercontent.com/u/1812148?v=4","gravatar_id":"","url":"https://api.github.com/users/uliska","html_url":"https://github.com/uliska","followers_url":"https://api.github.com/users/uliska/followers","following_url":"https://api.github.com/users/uliska/following{/other_user}","gists_url":"https://api.github.com/users/uliska/gists{/gist_id}","starred_url":"https://api.github.com/users/uliska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uliska/subscriptions","organizations_url":"https://api.github.com/users/uliska/orgs","repos_url":"https://api.github.com/users/uliska/repos","events_url":"https://api.github.com/users/uliska/events{/privacy}","received_events_url":"https://api.github.com/users/uliska/received_events","type":"User","site_admin":false},"body":"This pull request adds an option `utf8foldernames` that can be applied on account level. If enabled folder names are immediately converted from IMAP4_utf-7 to utf-8 when fetched from an IMAP server and reencoded to utf-7 immediately before contacting the IMAP server again. This means that all operations performed during the synchronization and all values passed to config options can be submitted as utf-8 strings.\r\n\r\nMore details can be found in the commit messages and in the documentation added in 83490c636a59994a5d39a3a608c48f4cbdf2d440.\r\n\r\nEnabling utf-8 support will fundamentally break an existing synchronization pair, so after some discussion and consideration I realized that there is no need trying to avoid breaks of individual functions. Users who want to enable utf-8 will *have* to create a new copy of the local repository and review any configuration options they have specified. This is clearly documented.\r\n\r\nMore details on the state of development and testing at the end.\r\n\r\n### Peer reviews\r\n\r\nTrick to [fetch the pull request](https://help.github.com/articles/checking-out-pull-requests-locally):\r\nthere is a (read-only) `refs/pull/` namespace.\r\n\r\n``` bash\r\ngit fetch OFFICIAL_REPOSITORY_NAME pull/PULL_ID/head:LOCAL_BRANCH_NAME\r\n```\r\n\r\n### This PR\r\n\r\n- [x] I've read the [DCO](http://www.offlineimap.org/doc/dco.html).\r\n- [x] I've read the [Coding Guidelines](http://www.offlineimap.org/doc/CodingGuidelines.html)\r\n- [x] The relevant informations about the changes stands in the commit message, not here in the message of the pull request.\r\n- [x] Code changes follow the style of the files they change.\r\n- [x] Code is tested (provide details). **See below**\r\n\r\n### References\r\n\r\n- Issue #299 \r\n- Issue #497 \r\n- Issues on the fork: https://github.com/uliska/offlineimap/issues?q=is%3Aissue+is%3Aclosed\r\n\r\n### Additional information\r\n\r\nI have tested the functionality against web.de, a public freemail service, and against accounts on a Dovecot installation on my own remote server.\r\n\r\nI did **not** try to test any possible combination of server settings and did **not** perform any stress testing against configuration options. I just tested that it \"works for me\", i.e. on the accounts I already have.\r\n\r\nI **have tested** the following configuration options with `utf8foldernames`:\r\n\r\n* `decodefoldernames`  \r\n  The old option does not work together with the new, so having both is considered a misconfiguration.  \r\n  In this case the affected account will not be synchonized (with an error message), other accounts are not affected.\r\n* `folderfilter`\r\n* `folderincludes`\r\n* `foldersort`\r\n\r\n**I have not tested** the following configurations:\r\n\r\n* `nametrans`  \r\n  as I didn't figure out a reasonable way to use nametrans in the first place.  \r\n  However, apart from having passed the utf-8 encoded folder name to `nametrans` there *should* be no differences.\r\n* `idlefolders`  \r\n  I didn't manage to get this option to work at all, not even with the stable version without the new option. So I couldn't test any issues with this.\r\n* **GMail**  \r\nI didn't manage to set up a GMail synchronization so I didn't test the new option with that.  \r\nHowever, as GMail inherits from the IMAP classes the changes *do* have effects on that. I *assume* that GMail suffered the same limitations as plain IMAP, so I *assume* that it will experience the same benefits now, but I strongly suggest that this be tested separately.\r\n\r\n\r\n","created_at":"2017-09-28T11:09:45Z","updated_at":"2017-09-28T11:17:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"214715f07a74adb9d2dea91b35784ec9ef9eee48","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/498/commits","review_comments_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/498/comments","review_comment_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/498/comments","statuses_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/statuses/83490c636a59994a5d39a3a608c48f4cbdf2d440","head":{"label":"uliska:uliska/utf8foldernames","ref":"uliska/utf8foldernames","sha":"83490c636a59994a5d39a3a608c48f4cbdf2d440","user":{"login":"uliska","id":1812148,"avatar_url":"https://avatars2.githubusercontent.com/u/1812148?v=4","gravatar_id":"","url":"https://api.github.com/users/uliska","html_url":"https://github.com/uliska","followers_url":"https://api.github.com/users/uliska/followers","following_url":"https://api.github.com/users/uliska/following{/other_user}","gists_url":"https://api.github.com/users/uliska/gists{/gist_id}","starred_url":"https://api.github.com/users/uliska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uliska/subscriptions","organizations_url":"https://api.github.com/users/uliska/orgs","repos_url":"https://api.github.com/users/uliska/repos","events_url":"https://api.github.com/users/uliska/events{/privacy}","received_events_url":"https://api.github.com/users/uliska/received_events","type":"User","site_admin":false},"repo":{"id":104333880,"name":"offlineimap","full_name":"uliska/offlineimap","owner":{"login":"uliska","id":1812148,"avatar_url":"https://avatars2.githubusercontent.com/u/1812148?v=4","gravatar_id":"","url":"https://api.github.com/users/uliska","html_url":"https://github.com/uliska","followers_url":"https://api.github.com/users/uliska/followers","following_url":"https://api.github.com/users/uliska/following{/other_user}","gists_url":"https://api.github.com/users/uliska/gists{/gist_id}","starred_url":"https://api.github.com/users/uliska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uliska/subscriptions","organizations_url":"https://api.github.com/users/uliska/orgs","repos_url":"https://api.github.com/users/uliska/repos","events_url":"https://api.github.com/users/uliska/events{/privacy}","received_events_url":"https://api.github.com/users/uliska/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/uliska/offlineimap","description":"Read/sync your IMAP mailboxes [Python]","fork":true,"url":"https://api.github.com/repos/uliska/offlineimap","forks_url":"https://api.github.com/repos/uliska/offlineimap/forks","keys_url":"https://api.github.com/repos/uliska/offlineimap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uliska/offlineimap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uliska/offlineimap/teams","hooks_url":"https://api.github.com/repos/uliska/offlineimap/hooks","issue_events_url":"https://api.github.com/repos/uliska/offlineimap/issues/events{/number}","events_url":"https://api.github.com/repos/uliska/offlineimap/events","assignees_url":"https://api.github.com/repos/uliska/offlineimap/assignees{/user}","branches_url":"https://api.github.com/repos/uliska/offlineimap/branches{/branch}","tags_url":"https://api.github.com/repos/uliska/offlineimap/tags","blobs_url":"https://api.github.com/repos/uliska/offlineimap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uliska/offlineimap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uliska/offlineimap/git/refs{/sha}","trees_url":"https://api.github.com/repos/uliska/offlineimap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uliska/offlineimap/statuses/{sha}","languages_url":"https://api.github.com/repos/uliska/offlineimap/languages","stargazers_url":"https://api.github.com/repos/uliska/offlineimap/stargazers","contributors_url":"https://api.github.com/repos/uliska/offlineimap/contributors","subscribers_url":"https://api.github.com/repos/uliska/offlineimap/subscribers","subscription_url":"https://api.github.com/repos/uliska/offlineimap/subscription","commits_url":"https://api.github.com/repos/uliska/offlineimap/commits{/sha}","git_commits_url":"https://api.github.com/repos/uliska/offlineimap/git/commits{/sha}","comments_url":"https://api.github.com/repos/uliska/offlineimap/comments{/number}","issue_comment_url":"https://api.github.com/repos/uliska/offlineimap/issues/comments{/number}","contents_url":"https://api.github.com/repos/uliska/offlineimap/contents/{+path}","compare_url":"https://api.github.com/repos/uliska/offlineimap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uliska/offlineimap/merges","archive_url":"https://api.github.com/repos/uliska/offlineimap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uliska/offlineimap/downloads","issues_url":"https://api.github.com/repos/uliska/offlineimap/issues{/number}","pulls_url":"https://api.github.com/repos/uliska/offlineimap/pulls{/number}","milestones_url":"https://api.github.com/repos/uliska/offlineimap/milestones{/number}","notifications_url":"https://api.github.com/repos/uliska/offlineimap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uliska/offlineimap/labels{/name}","releases_url":"https://api.github.com/repos/uliska/offlineimap/releases{/id}","deployments_url":"https://api.github.com/repos/uliska/offlineimap/deployments","created_at":"2017-09-21T10:23:46Z","updated_at":"2017-09-22T16:13:30Z","pushed_at":"2017-09-28T10:41:29Z","git_url":"git://github.com/uliska/offlineimap.git","ssh_url":"git@github.com:uliska/offlineimap.git","clone_url":"https://github.com/uliska/offlineimap.git","svn_url":"https://github.com/uliska/offlineimap","homepage":"http://www.offlineimap.org","size":5482,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"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":"OfflineIMAP:next","ref":"next","sha":"1ce596d7135e58186f14b7b193aa2100e5f296fa","user":{"login":"OfflineIMAP","id":2027973,"avatar_url":"https://avatars2.githubusercontent.com/u/2027973?v=4","gravatar_id":"","url":"https://api.github.com/users/OfflineIMAP","html_url":"https://github.com/OfflineIMAP","followers_url":"https://api.github.com/users/OfflineIMAP/followers","following_url":"https://api.github.com/users/OfflineIMAP/following{/other_user}","gists_url":"https://api.github.com/users/OfflineIMAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OfflineIMAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfflineIMAP/subscriptions","organizations_url":"https://api.github.com/users/OfflineIMAP/orgs","repos_url":"https://api.github.com/users/OfflineIMAP/repos","events_url":"https://api.github.com/users/OfflineIMAP/events{/privacy}","received_events_url":"https://api.github.com/users/OfflineIMAP/received_events","type":"Organization","site_admin":false},"repo":{"id":5153654,"name":"offlineimap","full_name":"OfflineIMAP/offlineimap","owner":{"login":"OfflineIMAP","id":2027973,"avatar_url":"https://avatars2.githubusercontent.com/u/2027973?v=4","gravatar_id":"","url":"https://api.github.com/users/OfflineIMAP","html_url":"https://github.com/OfflineIMAP","followers_url":"https://api.github.com/users/OfflineIMAP/followers","following_url":"https://api.github.com/users/OfflineIMAP/following{/other_user}","gists_url":"https://api.github.com/users/OfflineIMAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OfflineIMAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OfflineIMAP/subscriptions","organizations_url":"https://api.github.com/users/OfflineIMAP/orgs","repos_url":"https://api.github.com/users/OfflineIMAP/repos","events_url":"https://api.github.com/users/OfflineIMAP/events{/privacy}","received_events_url":"https://api.github.com/users/OfflineIMAP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OfflineIMAP/offlineimap","description":"Read/sync your IMAP mailboxes [Python]","fork":false,"url":"https://api.github.com/repos/OfflineIMAP/offlineimap","forks_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/forks","keys_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/teams","hooks_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/hooks","issue_events_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/events{/number}","events_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/events","assignees_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/assignees{/user}","branches_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/branches{/branch}","tags_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/tags","blobs_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/git/refs{/sha}","trees_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/statuses/{sha}","languages_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/languages","stargazers_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/stargazers","contributors_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/contributors","subscribers_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/subscribers","subscription_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/subscription","commits_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/commits{/sha}","git_commits_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/git/commits{/sha}","comments_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/comments{/number}","issue_comment_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/comments{/number}","contents_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/contents/{+path}","compare_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/merges","archive_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/downloads","issues_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues{/number}","pulls_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls{/number}","milestones_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/milestones{/number}","notifications_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/labels{/name}","releases_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/releases{/id}","deployments_url":"https://api.github.com/repos/OfflineIMAP/offlineimap/deployments","created_at":"2012-07-23T15:28:58Z","updated_at":"2017-09-28T02:42:08Z","pushed_at":"2017-09-28T11:09:46Z","git_url":"git://github.com/OfflineIMAP/offlineimap.git","ssh_url":"git@github.com:OfflineIMAP/offlineimap.git","clone_url":"https://github.com/OfflineIMAP/offlineimap.git","svn_url":"https://github.com/OfflineIMAP/offlineimap","homepage":"http://www.offlineimap.org","size":5474,"stargazers_count":1082,"watchers_count":1082,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":271,"mirror_url":null,"open_issues_count":39,"forks":271,"open_issues":39,"watchers":1082,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/498"},"html":{"href":"https://github.com/OfflineIMAP/offlineimap/pull/498"},"issue":{"href":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/498"},"comments":{"href":"https://api.github.com/repos/OfflineIMAP/offlineimap/issues/498/comments"},"review_comments":{"href":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/498/comments"},"review_comment":{"href":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OfflineIMAP/offlineimap/pulls/498/commits"},"statuses":{"href":"https://api.github.com/repos/OfflineIMAP/offlineimap/statuses/83490c636a59994a5d39a3a608c48f4cbdf2d440"}},"author_association":"NONE"}}
{"actor":{"display_login":"uliska"}}