• Login
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.
  • P
    Pradeep Kumar
    last edited by Jan 5, 2023, 10:20 AM

    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
    • G
      guy038
      last edited by guy038 Jan 5, 2023, 11:16 AM Jan 5, 2023, 10:56 AM

      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

      A 1 Reply Last reply Jan 5, 2023, 12:24 PM Reply Quote 2
      • A
        Alan Kilborn @guy038
        last edited by Alan Kilborn Jan 5, 2023, 1:12 PM Jan 5, 2023, 12:24 PM

        @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
        • G
          guy038
          last edited by guy038 Jan 5, 2023, 1:01 PM Jan 5, 2023, 1:00 PM

          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

          A 1 Reply Last reply Jan 5, 2023, 1:14 PM Reply Quote 1
          • A
            Alan Kilborn @guy038
            last edited by Jan 5, 2023, 1:14 PM

            @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?

            P 1 Reply Last reply Jan 6, 2023, 7:05 AM Reply Quote 1
            • P
              Pradeep Kumar @Alan Kilborn
              last edited by Jan 6, 2023, 7:05 AM

              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
              3 out of 6
              • First post
                3/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors