@deefeecee said in Copy-pasting & Replacing NUL characters:
If you’re going to link to a previous discussion (which happens to be the issue that originally brought me to this forum!), you could at least read through the end. That post explained that there is an Edit > Paste Special > menu, with entries Copy/Cut/Paste Binary Content. That was there in 2015 when I originally asked (though I didn’t know it, and none of the regulars pointed it out), and would have worked with an unedited, plain-vanilla installation of Notepad++ v6.8.7 (which was state-of-the-art in Dec 2015); it still worked in 2019 (after the First Plugin Conversion in v7.6.3); and it still works in the latest-and-greatest v8.3.3 in March 2022:
Oops, the animation clipped the menu; here’s a static version:
001311b6-aa41-4ffc-9c16-56a1918591b2-image.png
The steps are:
Highlight the text that has the NUL character(s) in it Edit > Paste Special > Copy Binary Content Move to where you want to paste Edit > Paste Special > Paste Binary ContentThose four simple steps will accomplish your goal, without having to go back to 2016’s NPP v6.9 and edit Scintilla.