I use Notepad++ to look at data. Notepad++ is able to load files with embedded null character. But if I copy a string with an embedded null character and paste it within another document or in another editor (Notepad, UltraEdit, Excel) it strips everything after the null character.
This is of course a bit confusing and at first glance looks like a bug.
What other text editors (Notepad, UltraEdit) do in such situation is to replace the null character 0x00 by a space 0x20 when filling the clipboard.
This solution is not perfect because the copy is then not identical to the original but:
- most of the copy is not stripped and
- most of the content is correct.
The weakness is not in Notepad++ but in Scintilla I submit a patch to the maintainer of Scintilla (Neil Hodgson) and it has now been merged into Scintilla.
In attachment you'll find a patch which is just a "copy" of what have been done in Scintilla.
Please don't hesitate to tell me how I can improve my contribution to help you to merge it into Notepad++