how to remove weird symbols

Hi my file is suffering from some weird text symbols like a question mark inside of a square. I don't know how to remove these. I tried to remove UTF accents with command
sed -e 's/^[ ]Width:[ ]//' -e 's/[ ]*$//'`
but no use
. Could u guyz plz help me.

this what i used to do to remove such weird characters

  • go to vim
  • then go to that particular character press "ga" ( will show you hex / octal values )
  • close the file.
  • perl -pi -e 's/\x(hex value)//g' <filename>

this may not be the best way to do what you wanted but it works for me.

It showing error
syntax error near unexpected token new line

Can you tell what does the below command o/p

sed -n "l" filename

cheers,
Devaraj Takhellambam

I solved it
Thanx