K
K
Konkase2015-03-16 13:55:36
bash
Konkase, 2015-03-16 13:55:36

How to remove strange space from text?

There is a strange gap in the text that does not lend itself to regular expressions.
The first example, a space entered from the keyboard:

echo -e " " | base64
IAo=

Second example: space from text:
echo -e " " | base64
IO+7vwo=

What is this gap in the text? and remove/replace/avoid it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konkase, 2015-03-16
@Konkase

Understood. Windows problems.
dos2unix saves

S
ShamblerR, 2015-03-16
@ShamblerR

open the file with a subline or vim, maybe there is not only a space, but also a special character, not all characters can be displayed in many encodings and even some editors.
For example, there are characters that are not visible even in phpmyadmin ;) but are visible in vim
, and there are symbols that are not visible in vim but visible in the subline, as a rule they are in the form of a certain icon.
Then get the hex16 of that character and do whatever you want with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question