Replace ascii 160 with spaces
-
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.
-
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
-
-
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.
-
Hi, @alan-kilborn and All,
May be I miss something but my solutions do change
no-break space
characters into simplespace
chars ?Cheers,
guy038
-
@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?
-
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.