Community
    • Login

    Replace ascii 160 with spaces

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 3 Posters 2.9k 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.
    • Pradeep KumarP
      Pradeep Kumar
      last edited by

      Hello All,

      We recently migrated a report from business objects to tableau and this is a regulatory report sent to bureau for processing. This has field with fixed length.

      During processing this file the bureau reported its failed as its recognised ascii characters.

      I compared the new file with old file through notepad++ and below is the only difference i see in the new file.

      View => show symbol => show all characters in Notepad++
      Old File:
      In the old file spaces displayed as orange dots.
      Ex: Name followed by 5 orange dots then telephone etc.

      New File:
      In the new file we have blank spaces instead orange dots for few fields.
      To insert trailing spaces, in tableau we used char(160) to introduced spaces and this is shown as blank spaces instead orange dots.

      We kind of exhausted all options in tableau and I would like to know, is there anything we can do in notepad++ to convert the blank spaces into orange dots to keep this in the old/expected format?

      Appreciate your suggestions and thanks in advance.

      Pradeep.

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by guy038

        Hello, @pradeep-kumar and All,

        Very easy to accomplish with the Find/Replace dialog !


        • Open the Replace dilaog ( Ctrl + H )

        • Untick ALL buttons

        • Tick the Wrap around box option

        • Now, 2 ways are possible :

          • SEARCH \d160 or \xA0

          • REPLACE \x20

          • Select the Extended (\n, \r, \t, \0, \x...) search mode

        • or

          • SEARCH \xA0 or \x{00A0}

          • REPLACE \x20 or ( ) ( there is a space char between the parentheses ! )

          • Select the Regular expression search mode

        • Whatever your choice, end by clicking on the Replace All button

        Here you are !

        Best Regards,

        guy038

        Alan KilbornA 1 Reply Last reply Reply Quote 2
        • Alan KilbornA
          Alan Kilborn @guy038
          last edited by Alan Kilborn

          @Pradeep-Kumar :

          So much bad/missing nomenclature… Even the title is wording is poor: “ascii 160”.

          Notepad++ only shows normal spaces (U+0020) as “orange dots” when View > Show Symbol > Show White Space And TAB ( or View > Show Symbol > Show All Characters) is enabled.

          The reason it appeared you had spaces without orange dots was that you had U+00A0 characters (no break space) in your document.

          1 Reply Last reply Reply Quote 1
          • guy038G
            guy038
            last edited by guy038

            Hi, @alan-kilborn and All,

            May be I miss something but my solutions do change no-break space characters into simple space chars ?

            Cheers,

            guy038

            Alan KilbornA 1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn @guy038
              last edited by

              @guy038 said in Replace ascii 160 with spaces:

              my solutions do change no-break space characters into simple space chars ?

              Yes.

              If you thought my earlier post was addressing the correctness of your solution, it wasn’t.

              When I first read the OP’s post, I was very confused as to what was being asked about. So my earlier posting was a critique on that, so that future readers looking for a similar solution can hopefully understand better?

              Pradeep KumarP 1 Reply Last reply Reply Quote 1
              • Pradeep KumarP
                Pradeep Kumar @Alan Kilborn
                last edited by

                Thanks @guy038, the solution seems to be working. I will try get this file processed by the engine.

                @Alan-Kilborn ok. My bad. I am trying to edit the title with no luck. Using this forum for the 1st time. I’ll see and edit the title if it allows me.

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