{"action":"opened","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/14158","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/14158/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/14158/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/14158/events","html_url":"https://github.com/JuliaLang/julia/issues/14158","id":119083471,"number":14158,"title":"nextind UTF8String issue","user":{"login":"JobJob","id":854183,"avatar_url":"https://avatars.githubusercontent.com/u/854183?v=3","gravatar_id":"","url":"https://api.github.com/users/JobJob","html_url":"https://github.com/JobJob","followers_url":"https://api.github.com/users/JobJob/followers","following_url":"https://api.github.com/users/JobJob/following{/other_user}","gists_url":"https://api.github.com/users/JobJob/gists{/gist_id}","starred_url":"https://api.github.com/users/JobJob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JobJob/subscriptions","organizations_url":"https://api.github.com/users/JobJob/orgs","repos_url":"https://api.github.com/users/JobJob/repos","events_url":"https://api.github.com/users/JobJob/events{/privacy}","received_events_url":"https://api.github.com/users/JobJob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-26T17:31:01Z","updated_at":"2015-11-26T17:31:01Z","closed_at":null,"body":"    s = \"🛀🛀\" #a bath codepoint is 4 bytes long\r\n    s12 = s[1:2] # \"🛀\"\r\n    s56 = s[5:6] # \"?\" #the expected behaviour is this should be the same as s12?\r\n    sizeof(s12)  # 4\r\n    sizeof(s56)  # 2\r\n\r\nThe issue seems to be that:\r\n\r\n    nextind(s, 2) # 5\r\n    nextind(s, 6) # 7 (prob should be 9)\r\n\r\nI tried changing https://github.com/JuliaLang/julia/blob/master/base/strings/basic.jl#L141 to \r\n\r\n    return sizeof(s)+1\r\n\r\nand it seems to fix the problem. Additionally `julia5 runtests.jl unicode string strings/basic strings/io strings/search strings/types strings/util` succeeds after making this change and recompiling.\r\n\r\nShould I add some tests and submit a PR?"}}