{"action":"created","issue":{"url":"https://api.github.com/repos/jim-easterbrook/pywws/issues/41","repository_url":"https://api.github.com/repos/jim-easterbrook/pywws","labels_url":"https://api.github.com/repos/jim-easterbrook/pywws/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/jim-easterbrook/pywws/issues/41/comments","events_url":"https://api.github.com/repos/jim-easterbrook/pywws/issues/41/events","html_url":"https://github.com/jim-easterbrook/pywws/issues/41","id":174135214,"number":41,"title":"Twitter UTF-8 character count","user":{"login":"mbirth","id":130302,"avatar_url":"https://avatars.githubusercontent.com/u/130302?v=3","gravatar_id":"","url":"https://api.github.com/users/mbirth","html_url":"https://github.com/mbirth","followers_url":"https://api.github.com/users/mbirth/followers","following_url":"https://api.github.com/users/mbirth/following{/other_user}","gists_url":"https://api.github.com/users/mbirth/gists{/gist_id}","starred_url":"https://api.github.com/users/mbirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbirth/subscriptions","organizations_url":"https://api.github.com/users/mbirth/orgs","repos_url":"https://api.github.com/users/mbirth/repos","events_url":"https://api.github.com/users/mbirth/events{/privacy}","received_events_url":"https://api.github.com/users/mbirth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jim-easterbrook/pywws/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"jim-easterbrook","id":1957023,"avatar_url":"https://avatars.githubusercontent.com/u/1957023?v=3","gravatar_id":"","url":"https://api.github.com/users/jim-easterbrook","html_url":"https://github.com/jim-easterbrook","followers_url":"https://api.github.com/users/jim-easterbrook/followers","following_url":"https://api.github.com/users/jim-easterbrook/following{/other_user}","gists_url":"https://api.github.com/users/jim-easterbrook/gists{/gist_id}","starred_url":"https://api.github.com/users/jim-easterbrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jim-easterbrook/subscriptions","organizations_url":"https://api.github.com/users/jim-easterbrook/orgs","repos_url":"https://api.github.com/users/jim-easterbrook/repos","events_url":"https://api.github.com/users/jim-easterbrook/events{/privacy}","received_events_url":"https://api.github.com/users/jim-easterbrook/received_events","type":"User","site_admin":false},"assignees":[{"login":"jim-easterbrook","id":1957023,"avatar_url":"https://avatars.githubusercontent.com/u/1957023?v=3","gravatar_id":"","url":"https://api.github.com/users/jim-easterbrook","html_url":"https://github.com/jim-easterbrook","followers_url":"https://api.github.com/users/jim-easterbrook/followers","following_url":"https://api.github.com/users/jim-easterbrook/following{/other_user}","gists_url":"https://api.github.com/users/jim-easterbrook/gists{/gist_id}","starred_url":"https://api.github.com/users/jim-easterbrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jim-easterbrook/subscriptions","organizations_url":"https://api.github.com/users/jim-easterbrook/orgs","repos_url":"https://api.github.com/users/jim-easterbrook/repos","events_url":"https://api.github.com/users/jim-easterbrook/events{/privacy}","received_events_url":"https://api.github.com/users/jim-easterbrook/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-08-30T21:51:47Z","updated_at":"2016-08-31T10:44:06Z","closed_at":null,"body":"I've seen in the code that ToTwitter.py limits the length of a tweet to 140 characters without attached media and 117 characters with media attached.\r\n\r\nTo calculate the length, the generated tweet is converted to utf-8 first. And then, the first 117 (or 140) characters are used.\r\n\r\nHowever, this counts multi-byte characters as multiple characters (`😎` = 4 characters, although it should be counted as only 1 character) where the [Twitter doc](https://dev.twitter.com/overview/api/counting-characters) clearly states that multi-byte characters count as one character."},"comment":{"url":"https://api.github.com/repos/jim-easterbrook/pywws/issues/comments/243727121","html_url":"https://github.com/jim-easterbrook/pywws/issues/41#issuecomment-243727121","issue_url":"https://api.github.com/repos/jim-easterbrook/pywws/issues/41","id":243727121,"user":{"login":"jim-easterbrook","id":1957023,"avatar_url":"https://avatars.githubusercontent.com/u/1957023?v=3","gravatar_id":"","url":"https://api.github.com/users/jim-easterbrook","html_url":"https://github.com/jim-easterbrook","followers_url":"https://api.github.com/users/jim-easterbrook/followers","following_url":"https://api.github.com/users/jim-easterbrook/following{/other_user}","gists_url":"https://api.github.com/users/jim-easterbrook/gists{/gist_id}","starred_url":"https://api.github.com/users/jim-easterbrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jim-easterbrook/subscriptions","organizations_url":"https://api.github.com/users/jim-easterbrook/orgs","repos_url":"https://api.github.com/users/jim-easterbrook/repos","events_url":"https://api.github.com/users/jim-easterbrook/events{/privacy}","received_events_url":"https://api.github.com/users/jim-easterbrook/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T10:44:06Z","updated_at":"2016-08-31T10:44:06Z","body":"I don't know what was going wrong in my earlier tests, but I'm now able to post 140 character strings with non-ASCII characters in. Commit 3919ae2 should fix the problem."}}
{"actor":{"display_login":"jim-easterbrook"}}