I want to replace all occurrences of non-ASCII chars in Unix to space but group of all the characters should to converted to a single space like :
CHAVEZ MONTA�O should be converted to CHAVEZ MONTAO<followed by one space>
How can I do so. I used below Perl command :
grep --color='auto' -P -n "[\x80-\xFF]" file.xml
But this is converting one single char in one space this is not what I want.
EDIT1:
I know CHAVEZ MONTA�O
converted to CHAVEZ MONTA O
makes more sense. But would be better if it is
CHAVEZ MONTAO<followed by one space>
But please suggest for CHAVEZ MONTA O
too.