{"action":"created","issue":{"url":"https://api.github.com/repos/ocornut/imgui/issues/832","repository_url":"https://api.github.com/repos/ocornut/imgui","labels_url":"https://api.github.com/repos/ocornut/imgui/issues/832/labels{/name}","comments_url":"https://api.github.com/repos/ocornut/imgui/issues/832/comments","events_url":"https://api.github.com/repos/ocornut/imgui/issues/832/events","html_url":"https://github.com/ocornut/imgui/issues/832","id":177316921,"number":832,"title":"ImTextCharFromUtf8 excludes a range of unicode characters","user":{"login":"josh04","id":97194,"avatar_url":"https://avatars.githubusercontent.com/u/97194?v=3","gravatar_id":"","url":"https://api.github.com/users/josh04","html_url":"https://github.com/josh04","followers_url":"https://api.github.com/users/josh04/followers","following_url":"https://api.github.com/users/josh04/following{/other_user}","gists_url":"https://api.github.com/users/josh04/gists{/gist_id}","starred_url":"https://api.github.com/users/josh04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh04/subscriptions","organizations_url":"https://api.github.com/users/josh04/orgs","repos_url":"https://api.github.com/users/josh04/repos","events_url":"https://api.github.com/users/josh04/events{/privacy}","received_events_url":"https://api.github.com/users/josh04/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-15T23:44:57Z","updated_at":"2016-09-17T10:42:08Z","closed_at":"2016-09-16T08:56:45Z","body":"Using a sample paragraph which includes the text \"  ‘possible worlds’ \" in TextWrapped, ImGui would not print any characters from the first quote onwards. (Unicode codepoint 0x91)\r\n\r\nAs far as I can tell, in the case of UTF-8 characters which are greater than 0x80 but less than 0xE0, ImTextCharFromUtf8 fails to recognise the character and returns a null, truncating the string to that point. I'm not knowledgeable about UTF-8 enough to say exactly what ImTextCharFromUtf8 is doing or for what purpose in excluding these values, but replacing\r\n\r\n`\t*out_char = 0;\r\n    return 0;`\r\n\r\nwith \r\n\r\n`\t*out_char = *str;\r\n    return 1;`\r\n\r\nOn line 950 of imgui.cpp has resolved my issue, but it obviously might cause others."},"comment":{"url":"https://api.github.com/repos/ocornut/imgui/issues/comments/247762323","html_url":"https://github.com/ocornut/imgui/issues/832#issuecomment-247762323","issue_url":"https://api.github.com/repos/ocornut/imgui/issues/832","id":247762323,"user":{"login":"ocornut","id":8225057,"avatar_url":"https://avatars.githubusercontent.com/u/8225057?v=3","gravatar_id":"","url":"https://api.github.com/users/ocornut","html_url":"https://github.com/ocornut","followers_url":"https://api.github.com/users/ocornut/followers","following_url":"https://api.github.com/users/ocornut/following{/other_user}","gists_url":"https://api.github.com/users/ocornut/gists{/gist_id}","starred_url":"https://api.github.com/users/ocornut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocornut/subscriptions","organizations_url":"https://api.github.com/users/ocornut/orgs","repos_url":"https://api.github.com/users/ocornut/repos","events_url":"https://api.github.com/users/ocornut/events{/privacy}","received_events_url":"https://api.github.com/users/ocornut/received_events","type":"User","site_admin":false},"created_at":"2016-09-17T10:42:08Z","updated_at":"2016-09-17T10:42:08Z","body":"```\r\nvoid    ImDumpHex(const u8* ptr, int count, int line_limit)\r\n{\r\n    for (int n = 0; n < count; n++)\r\n    {\r\n        if (n > 0 && (line_limit == 0 || (n % line_limit) != 0))\r\n            ImGui::SameLine();\r\n        ImGui::Text(\"%02X\", ptr[n]);\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"ocornut"}}