Is it possible to suppress NUL?

2005-02-11
2012-11-13
  • Nobody/Anonymous

    I'd like to use notepad to view all my text files, although certain text files contain nul characters in them and I cannot find out how to suppress them.  Having them displayed makes the text virtually unreadable.  Here's an example:

    <NUL>S<NUL>P<NUL>I<NUL>D<NUL> <NUL> <NUL>S<NUL>t<NUL>a<NUL>t<NUL>u<NUL>s<NUL>

     
    • Don HO

      Don HO - 2005-02-13

      Obviously it's UCS2 encoding file without BOM (or with an unknown BOM).

      I'll see what can I do but I promise you nothing.

      Don

       
      • Nobody/Anonymous

        please could there be a menu option &or shortcut to toggle nul, SYN etc and other special characters being displayed, may log files are completely unreadable as the grandparent poster has mentioned.

        It's something I've been surprised isn't there in n++ for nearly a year now tbh.

         
        • Nobody/Anonymous

          I too have come to rant about this. Any fix for it yet?

           
    • Nobody/Anonymous

      It seems this was never fixed.  Not only is readability affected, but copying text with the NUL character and pasting it causes the pasted text to be truncated at the first NUL character.

       
    • Nobody/Anonymous

      I meant 'many log files etc'

       
    • Nobody/Anonymous

      How about an option to insert a BOM (and hope it's the right one) when saving files? Does that make sense?  I haven't had problems with these files yet, but I suppose there's a first time.  Alternately, one should be able to very easily remove the 0 value characters in the hex plugin.

       
      • Nobody/Anonymous

        1. Select a NUL character
        2. Press CTRL+R to open the Advanced Find/Replace Dialog
        3. The NUL character is already in the Find field
        4. Make sure the Replace field is empty (if not: press TAB, CTRL+A and Delete or Backspace)
        5. Make sure Regular Expression is unchecked (if not: press ALT+X)
        6. Make sure Selection is turned unchecked (if not: press ALT+E)
        7. (You might want or need to) turn on Wrap mode (ALT+P)
        8. Press ALT+F to find the _next_ occurrence
        9. Press ALT+R to replace all occurrences from there

        Wrap mode may be turned on, because the selected occurrence itself won't be found.
        I think this certainly is a current drawback of the Advanced Replace Dialog.
        It prevents you from replacing all occurrences when selecting the first occurrence to easily copy it into the Find field. I hate wrap mode, so I would very much like this to be fixed.

        One other thing, I tried replacing matching ends of lines in a read-only file. I could wait for ages, because nothing got changed but the same match was found over and over again...

         
        • Nobody/Anonymous

          Of course this won't leave a single NUL is there was a "legal" double NUL in the file before (if those ever occur at all).

           

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks