• Login
Community
  • Login

Invisible spaces

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
10 Posts 4 Posters 7.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    glossar
    last edited by Dec 19, 2020, 10:32 PM

    Hi all,
    What kind of spaces are those spaces/things, hopefully noticeable, at the beginning of each line in the screenshot? No blank operation works, i can’t locate them by Find/Replace either. They are however manually selectable and deletable. How can I delete them in one-go?

    Notice the color change from blueish/greenish to the grayish one, seen in red rectangle.

    alt text

    Thanks in advance,
    glossar

    P A 2 Replies Last reply Dec 19, 2020, 10:56 PM Reply Quote 0
    • P
      PeterJones @glossar
      last edited by Dec 19, 2020, 10:56 PM

      @glossar ,

      Well, we don’t have the file, so we cannot know for sure.

      I assume, since you have View > Show Symbol > Show whitespace and tab turned on, that all the normal space characters are the yellow/orange dots, and that those aren’t the spaces you are talking about. I assume you mean the actual character that highlights grey.

      There are many characters that show up as a space in unicode, and multiple characters in most subset encodings (like ANSI). My first guess would be the non-breaking space (U+0020) . To search for that character, you can use \xA0 in Regular Expression (or even Extended ) Search Mode. (I guess nbsp, because it’s one of the most common, and often used to convince HTML and other places not to collapse spaces.)

      But there are plenty of other space/space-like characters in Unicode – you can search any of them with \x{ℕℕℕℕ} in regular expression mode, where ℕℕℕℕ is the code from U+ℕℕℕℕ, assuming you know the code.

      Generically, \s will search for any Unicode space character… but if you only want to replace or delete the specific type of space, you’d need to figure out exactly which it is.

      G 1 Reply Last reply Dec 20, 2020, 8:38 AM Reply Quote 4
      • A
        Alan Kilborn @glossar
        last edited by Dec 19, 2020, 11:39 PM

        @glossar

        The hex editor plugin might help here.
        You can put your caret on the character in question, then flip hex mode on.
        Then you’ll see the raw bytes that make up the character, and you can figure out what exactly it is, and thus how to search for it.
        This presumes you are in UTF-8 land, which is likely?

        Otherwise, if you don’t really care and just want to search for others like it, can’t you select the “grey” area and press Ctrl+f, at which point Notepad++ should put something in the Find what box of the Find window, and allow you to search for it?

        1 Reply Last reply Reply Quote 4
        • C
          carypt
          last edited by Dec 20, 2020, 3:35 AM

          unproofed ; there is conversion-plugin . and gotolinecol-plugin .

          A 1 Reply Last reply Dec 20, 2020, 4:03 AM Reply Quote -2
          • A
            Alan Kilborn @carypt
            last edited by Dec 20, 2020, 4:03 AM

            @carypt

            What do THOSE things have to do with the original question asked?
            We are all for anyone answering questions here, but you have to know something about what is being asked and what you are talking about in your response.
            Please refrain from answering if you know nothing, as future readers with the same problem as the OP will just have to sort through it to get the answer they need.

            C 1 Reply Last reply Dec 20, 2020, 9:57 AM Reply Quote 0
            • G
              glossar @PeterJones
              last edited by Dec 20, 2020, 8:38 AM

              @PeterJones

              Yes, turned out they are non-breaking spaces and \xA0 did the trick!

              Many thanks and have a nice Sunday :)
              glossar.

              1 Reply Last reply Reply Quote 0
              • C
                carypt @Alan Kilborn
                last edited by Dec 20, 2020, 9:57 AM

                @Alan-Kilborn both plugins enabe to find ot the nature of the unknown character , dont they ? like the hexplugin . but i have to agree , my answer was a bit too short and is building up on peter jones suggest. i was wondering myself how to find the unicode of unknown character . your ctrl+f-idea didnt work out for my system .

                A 1 Reply Last reply Dec 20, 2020, 1:04 PM Reply Quote 0
                • A
                  Alan Kilborn @carypt
                  last edited by Dec 20, 2020, 1:04 PM

                  @carypt said in Invisible spaces:

                  your ctrl+f-idea didnt work out for my system

                  For that to work you’d have to have this setting set the way it is shown here:
                  b638fce4-855b-4992-8278-4fc1c31ac54c-image.png

                  C 1 Reply Last reply Dec 20, 2020, 2:02 PM Reply Quote 1
                  • A
                    Alan Kilborn
                    last edited by Dec 20, 2020, 1:06 PM

                    There are also ways to script such that “invisible characters” get shown to you; see this THREAD for some suggestions on that.

                    1 Reply Last reply Reply Quote 1
                    • C
                      carypt @Alan Kilborn
                      last edited by Dec 20, 2020, 2:02 PM

                      @Alan-Kilborn oh yes , i see , i forgot that i made that special setting for my npp-search, thus ctrl-f couldnt work as intended . sry for trouble . on the other hand i want to say that i might have not the time or knowledge to pile up a fully complete solution for a problem , but still wanting to share the results of my research (time consuming too) as "hints"even if it might need tweaking . thats why its called unprooven , to not cause messing up the tidyness of thoughts

                      1 Reply Last reply Reply Quote 1
                      9 out of 10
                      • First post
                        9/10
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors