Recently I'd failed to copy/paste simple text block with text editor SciTE - I was able to copy (and paste) only a part of selected text block. Well, I've cowardly thought that the time has come to leave an old good friend and migrate to proven Notepad++. No sooner said than done. And.. the famous Notepad++ couldn't copy the same text block also! Googling help me, I thought and started.
Firstly, I found out that Notepad uses SciTE component (at-least) for the copy-paste. Then I went deeper and realized that text block which is finally pasted stops on the symbol NUL, i.e., I was able to copy everything up to the first NUL occurrence. And again, Google gave me an answer - this is another one funny Windows limitation. Text with NUL character can't be copy/pasted in Windows.
But it was really necessary to copy that text! The only way I found was to make Notepad++ interpret NUL characters as white spaces and then - do copy/paste.
I also tried to use a native notepad.exe to open the problematic document - and again, Windows played the worst - NUL character were not shown as NUL, they were automatically transformed to white spaces. As you may guess, copy/pasting of text block with white spaces is affordable even for notepad.exe.
P.S.
NUL character in Notepad++.
Look out, you naive copy-pasters!
Firstly, I found out that Notepad uses SciTE component (at-least) for the copy-paste. Then I went deeper and realized that text block which is finally pasted stops on the symbol NUL, i.e., I was able to copy everything up to the first NUL occurrence. And again, Google gave me an answer - this is another one funny Windows limitation. Text with NUL character can't be copy/pasted in Windows.
But it was really necessary to copy that text! The only way I found was to make Notepad++ interpret NUL characters as white spaces and then - do copy/paste.
I also tried to use a native notepad.exe to open the problematic document - and again, Windows played the worst - NUL character were not shown as NUL, they were automatically transformed to white spaces. As you may guess, copy/pasting of text block with white spaces is affordable even for notepad.exe.
P.S.
NUL character in Notepad++.
Look out, you naive copy-pasters!

Hello dear Artem,
ReplyDeleteHow can I visualize NUL special characters inside a file ?
Thanks in advance :)
FootPassion, I'd updated my post, take a look at the "P.S."
ReplyDelete