Hidden characters inserted after pipe (|) followed by a space [duplicate]
Solution 1:
What happens is that you keep pressing ⌥ with the space bar, which inserts a non-breaking space, known in HTML through the
reference. This non-breaking space is useful in text processing where you want certain words to stick together, like the "OS" and "X" in "OS X".
Obviously, this is a unicode character (00A0
), and therefore most of the command-line utilities will fail, such as bash seeing _cat
(where _
is the non-breaking space), and Hex Fiend just using a bad representation for it. Some editors on the other hand will just silently strip it out (e.g. this editor right here), while others even have a special representation for it (e.g. TextMate showing a dot instead of the blank space).
There are two solutions:
Pay more attention to let go of the ⌥ key when pressing the space bar. By the way: It happens to me all the time too.
Disable the combination altogether: How to disable the Option-Space key combination for non-breaking spaces?