Grep a strange acirc character
Posted
by
John Hunt
on Server Fault
See other posts from Server Fault
or by John Hunt
Published on 2011-03-09T21:47:45Z
Indexed on
2011/03/10
0:12 UTC
Read the original article
Hit count: 600
I have this character appearing in places in some files I have: Â (if you can't see it or it looks like a question mark it's the Acirc character (capital A with a circumflex over it))
I simply want to grep replace this char with a space, however when I do this:
grep --color -ri  myproject.php
Putty gets very confused, as does grep.
As I understand it there's probably a way to use an escaped hex code with grep.. does anyone know how?
EDIT:
The character is showing up on my web page as a weird <?>
. The http headers for the page specify utf-8 as does the meta character set and I still see the strange character. In putty it appears as a space (putty also set to utf-8.) When I copy from vim and paste into grep it simply doesn't find it.
Cheers, John
© Server Fault or respective owner