Menu

Copy/paste of text with NUL characters

2007-09-21
2012-11-13
  • alexandroid

    alexandroid - 2007-09-21

    Hi!

    I found that if I copy a text with NUL characters (zero ASCII code) and paste it somewhere, the text gets truncated to the 1st NUL character. So I have to replace \x00 by \n first and then copy the text block.

    I am not sure how this should work and whether it's the problem of copying and Windows Clipboard or the programs I try to paste the text into (Notepad, Outlook, FAR editor...).

    Since I don't see this problem with Notepad and FAR, I think they must be removing NUL characters from the text being copied to the clipboard, or remove them during opening the file at all.

    Is there any options in Notepad++ that could do this automatically? Or it's some kind of a bug?

    And if you're curious what files contain NUL characters -- that's build logs generated by Visual Studio. =\

    Thanks,
    Alexander

     
    • Chris Severance

      Chris Severance - 2007-10-01

      The standard paste tool is implemented by the Scintilla editor component and it adheres to the standard which is to stop at a NUL character. Most other programs will adhere to this standard too. The TextFX copy and paste tools can handle NUL bytes. Turn on TextFX Viz Settings Capture Keyboard Ctrl-C,X,V and with the help of other nearby settings you should be able to get the NUL clipboard handling you need.

       
      • koyama

        koyama - 2009-01-14

        Thanks, but I couldn't make it work. I have turned on TextFX Viz Settings Capture Keyboard Ctrl-C,X,V, restarted Notepad++, but copy-paste still truncates at the first NUL character.

        What more settings do I need to change?

         
      • Nobody/Anonymous

        It worked! Thank you very much!

         
MongoDB Logo MongoDB