{"action":"created","issue":{"url":"https://api.github.com/repos/roguePanda/MacVoikko/issues/4","labels_url":"https://api.github.com/repos/roguePanda/MacVoikko/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/roguePanda/MacVoikko/issues/4/comments","events_url":"https://api.github.com/repos/roguePanda/MacVoikko/issues/4/events","html_url":"https://github.com/roguePanda/MacVoikko/issues/4","id":53285702,"number":4,"title":"Non-ascii input triggers out of bounds exception","user":{"login":"snomos","id":1255285,"avatar_url":"https://avatars.githubusercontent.com/u/1255285?v=3","gravatar_id":"","url":"https://api.github.com/users/snomos","html_url":"https://github.com/snomos","followers_url":"https://api.github.com/users/snomos/followers","following_url":"https://api.github.com/users/snomos/following{/other_user}","gists_url":"https://api.github.com/users/snomos/gists{/gist_id}","starred_url":"https://api.github.com/users/snomos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snomos/subscriptions","organizations_url":"https://api.github.com/users/snomos/orgs","repos_url":"https://api.github.com/users/snomos/repos","events_url":"https://api.github.com/users/snomos/events{/privacy}","received_events_url":"https://api.github.com/users/snomos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-02T23:30:49Z","updated_at":"2015-01-03T14:38:47Z","closed_at":null,"body":"To repeat:\r\n* build and install MacVoikko\r\n* open a document in any editor with MacVoikko\r\n* input e.g. \"giellá\", and notice how there will be an exception in the console, and that there will be no red underline even though the input is not accepted by the speller\r\n\r\nThe problem is found in the function enumerateTokens: withBlock: in CocoaVoikko.m, but I am not able to see how to solve it. Inspiration can probably be found in the VoikkoSpellService project (https://github.com/walokra/osxspell), in the function \"spellServer: findMisspelledWordInString: language: wordCount: countOnly:\" in VoikkoSpellService.m."},"comment":{"url":"https://api.github.com/repos/roguePanda/MacVoikko/issues/comments/68596785","html_url":"https://github.com/roguePanda/MacVoikko/issues/4#issuecomment-68596785","issue_url":"https://api.github.com/repos/roguePanda/MacVoikko/issues/4","id":68596785,"user":{"login":"roguePanda","id":1683332,"avatar_url":"https://avatars.githubusercontent.com/u/1683332?v=3","gravatar_id":"","url":"https://api.github.com/users/roguePanda","html_url":"https://github.com/roguePanda","followers_url":"https://api.github.com/users/roguePanda/followers","following_url":"https://api.github.com/users/roguePanda/following{/other_user}","gists_url":"https://api.github.com/users/roguePanda/gists{/gist_id}","starred_url":"https://api.github.com/users/roguePanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roguePanda/subscriptions","organizations_url":"https://api.github.com/users/roguePanda/orgs","repos_url":"https://api.github.com/users/roguePanda/repos","events_url":"https://api.github.com/users/roguePanda/events{/privacy}","received_events_url":"https://api.github.com/users/roguePanda/received_events","type":"User","site_admin":false},"created_at":"2015-01-03T14:38:47Z","updated_at":"2015-01-03T14:38:47Z","body":"I think the problem is that `voikkoNextTokenCstr` is in terms of bytes while `[NSString substringWithRange]` is in terms of characters. For ASCII, those are the same, so I wouldn't have noticed earlier."}}