{"action":"created","issue":{"url":"https://api.github.com/repos/jacobslusser/ScintillaNET/issues/298","repository_url":"https://api.github.com/repos/jacobslusser/ScintillaNET","labels_url":"https://api.github.com/repos/jacobslusser/ScintillaNET/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/jacobslusser/ScintillaNET/issues/298/comments","events_url":"https://api.github.com/repos/jacobslusser/ScintillaNET/issues/298/events","html_url":"https://github.com/jacobslusser/ScintillaNET/issues/298","id":196783391,"number":298,"title":"Accept strings containing nulls?","user":{"login":"pg94au","id":5140674,"avatar_url":"https://avatars.githubusercontent.com/u/5140674?v=3","gravatar_id":"","url":"https://api.github.com/users/pg94au","html_url":"https://github.com/pg94au","followers_url":"https://api.github.com/users/pg94au/followers","following_url":"https://api.github.com/users/pg94au/following{/other_user}","gists_url":"https://api.github.com/users/pg94au/gists{/gist_id}","starred_url":"https://api.github.com/users/pg94au/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pg94au/subscriptions","organizations_url":"https://api.github.com/users/pg94au/orgs","repos_url":"https://api.github.com/users/pg94au/repos","events_url":"https://api.github.com/users/pg94au/events{/privacy}","received_events_url":"https://api.github.com/users/pg94au/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-20T21:16:53Z","updated_at":"2016-12-21T18:01:35Z","closed_at":null,"body":"From what I've seen from testing on my own, the ScintillaNET control does not accept null characters in strings.\r\n\r\nIf I set the `Text` property to a value like `\"abc\\0def\"`, the control does not display anything beyond `\"abc\"`.  If I open a file containing null bytes in Notepad++ and copy and paste to the ScintillaNET control, the NUL characters are replaced by spaces (0x20).\r\n\r\nIs there a way to get ScintillaNET to work with null bytes in the content?"},"comment":{"url":"https://api.github.com/repos/jacobslusser/ScintillaNET/issues/comments/268595696","html_url":"https://github.com/jacobslusser/ScintillaNET/issues/298#issuecomment-268595696","issue_url":"https://api.github.com/repos/jacobslusser/ScintillaNET/issues/298","id":268595696,"user":{"login":"jacobslusser","id":345183,"avatar_url":"https://avatars.githubusercontent.com/u/345183?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobslusser","html_url":"https://github.com/jacobslusser","followers_url":"https://api.github.com/users/jacobslusser/followers","following_url":"https://api.github.com/users/jacobslusser/following{/other_user}","gists_url":"https://api.github.com/users/jacobslusser/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobslusser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobslusser/subscriptions","organizations_url":"https://api.github.com/users/jacobslusser/orgs","repos_url":"https://api.github.com/users/jacobslusser/repos","events_url":"https://api.github.com/users/jacobslusser/events{/privacy}","received_events_url":"https://api.github.com/users/jacobslusser/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T18:01:35Z","updated_at":"2016-12-21T18:01:35Z","body":"For future reference for anyone else (and myself), this boils down to how the Scintilla API is set up. In some instances it will accept C-style null-terminated strings. In others APIs, strings are length specified.\r\n\r\nExample null-terminated APIs:\r\n- [SCI_SETTEXT](http://www.scintilla.org/ScintillaDoc.html#SCI_SETTEXT) - which cooresponds to [Text](https://github.com/jacobslusser/ScintillaNET/blob/master/src/ScintillaNET/Scintilla.cs#L5009-L5021) setter\r\n- [SCI_INSERTTEXT](http://www.scintilla.org/ScintillaDoc.html#SCI_INSERTTEXT) - which cooresponds to [InsertText](https://github.com/jacobslusser/ScintillaNET/blob/master/src/ScintillaNET/Scintilla.cs#L1288-L1304)\r\n\r\nExample length specified APIs:\r\n- [SCI_APPENDTEXT](http://www.scintilla.org/ScintillaDoc.html#SCI_APPENDTEXT) - which cooresponds to [AppendText](https://github.com/jacobslusser/ScintillaNET/blob/master/src/ScintillaNET/Scintilla.cs#L157-L162)\r\n\r\nThere are others if anyone else wants to document them.\r\n\r\nFor loading large strings, the best (although most complicated) way is still probably [Background Loading](https://github.com/jacobslusser/ScintillaNET/wiki/Documents#background-loading) which has the benefit of being accessible from a background thread *and* supports `null` characters because it is length-based.\r\n\r\n"}}
{"actor":{"display_login":"jacobslusser"}}