{"action":"created","issue":{"url":"https://api.github.com/repos/zentyal/sope/issues/29","repository_url":"https://api.github.com/repos/zentyal/sope","labels_url":"https://api.github.com/repos/zentyal/sope/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/zentyal/sope/issues/29/comments","events_url":"https://api.github.com/repos/zentyal/sope/issues/29/events","html_url":"https://github.com/zentyal/sope/pull/29","id":134534373,"number":29,"title":"Use same way to get NSStringEncoding in similar methods","user":{"login":"javierag","id":2778038,"avatar_url":"https://avatars.githubusercontent.com/u/2778038?v=3","gravatar_id":"","url":"https://api.github.com/users/javierag","html_url":"https://github.com/javierag","followers_url":"https://api.github.com/users/javierag/followers","following_url":"https://api.github.com/users/javierag/following{/other_user}","gists_url":"https://api.github.com/users/javierag/gists{/gist_id}","starred_url":"https://api.github.com/users/javierag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierag/subscriptions","organizations_url":"https://api.github.com/users/javierag/orgs","repos_url":"https://api.github.com/users/javierag/repos","events_url":"https://api.github.com/users/javierag/events{/privacy}","received_events_url":"https://api.github.com/users/javierag/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-18T10:06:31Z","updated_at":"2016-02-18T16:32:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zentyal/sope/pulls/29","html_url":"https://github.com/zentyal/sope/pull/29","diff_url":"https://github.com/zentyal/sope/pull/29.diff","patch_url":"https://github.com/zentyal/sope/pull/29.patch"},"body":"Currently there are two methods to get the NSStringEncoding\r\nfrom a named encoding [NGMime stringEncodingForCharset:] and\r\n[NSString stringEncodingForEncodingNamed] this two are not\r\nonly redundant but use a different way to match the NSStringEncoding\r\nwith its name. This can spell difficult to trace bugs.\r\n\r\n[NGMime stringEncodingForCharset:] uses a hardcoded table.\r\n\r\n[NSString stringEncodingForEncodingNamed] depends on the system,\r\ncompiled with GNUStep uses a call to GSMimeDocument.\r\n\r\nThis commit makes [NGMime stringEncodingForCharset:] to call\r\n[NSString stringEncodingForEncodingNamed] to assure we use\r\nthe same resolution method.\r\n\r\nThis does not make the methods totally equivalent, with unknown\r\nencodings [NSString stringEncodingForEncodingNamed] returns 0\r\nbut [NSString stringEncodingForEncodingNamed] returns either\r\nNSISOLatin1StringEncoding or [NSString defaultCStringEncoding].\r\nThe last value is returned for nil or empty charset names.\r\n\r\nIf this changset is accepted, the next step would be to replace\r\ncalls to [NGMime stringEncodingForCharset:] with\r\n[NGMime stringEncodingForCharset:] calls."},"comment":{"url":"https://api.github.com/repos/zentyal/sope/issues/comments/185803612","html_url":"https://github.com/zentyal/sope/pull/29#issuecomment-185803612","issue_url":"https://api.github.com/repos/zentyal/sope/issues/29","id":185803612,"user":{"login":"javierag","id":2778038,"avatar_url":"https://avatars.githubusercontent.com/u/2778038?v=3","gravatar_id":"","url":"https://api.github.com/users/javierag","html_url":"https://github.com/javierag","followers_url":"https://api.github.com/users/javierag/followers","following_url":"https://api.github.com/users/javierag/following{/other_user}","gists_url":"https://api.github.com/users/javierag/gists{/gist_id}","starred_url":"https://api.github.com/users/javierag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierag/subscriptions","organizations_url":"https://api.github.com/users/javierag/orgs","repos_url":"https://api.github.com/users/javierag/repos","events_url":"https://api.github.com/users/javierag/events{/privacy}","received_events_url":"https://api.github.com/users/javierag/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T16:32:27Z","updated_at":"2016-02-18T16:32:27Z","body":"Jenkins retest this please"}}