How do I remove a special character in a file?

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I had to use OCR to get the text of a very large script I did not want to type by hand.
I have multiple lines like this
echo "<91>ps <97>eF|grep...
It should read;
echo "`ps -eF|grep...
Even with ":set list" the only thing I see is <91> and <97>
I tried this and other ASCII characters to insert the back quote:
sed -e 's/'$(echo "97")'/`/g'
to no avail.
Either I'm doing this all wrong or using the wrong control values.
Can you suggest something else?
vi special-characters
add a comment |Â
up vote
1
down vote
favorite
I had to use OCR to get the text of a very large script I did not want to type by hand.
I have multiple lines like this
echo "<91>ps <97>eF|grep...
It should read;
echo "`ps -eF|grep...
Even with ":set list" the only thing I see is <91> and <97>
I tried this and other ASCII characters to insert the back quote:
sed -e 's/'$(echo "97")'/`/g'
to no avail.
Either I'm doing this all wrong or using the wrong control values.
Can you suggest something else?
vi special-characters
what doeshexdumporxxdshow for the relevant contents of the script?
â thrig
Jun 27 at 18:39
0000002896 | ".ps .eF|grep "|
â Marinaio
Jun 27 at 19:15
Are they periods?
â Marinaio
Jun 27 at 19:15
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I had to use OCR to get the text of a very large script I did not want to type by hand.
I have multiple lines like this
echo "<91>ps <97>eF|grep...
It should read;
echo "`ps -eF|grep...
Even with ":set list" the only thing I see is <91> and <97>
I tried this and other ASCII characters to insert the back quote:
sed -e 's/'$(echo "97")'/`/g'
to no avail.
Either I'm doing this all wrong or using the wrong control values.
Can you suggest something else?
vi special-characters
I had to use OCR to get the text of a very large script I did not want to type by hand.
I have multiple lines like this
echo "<91>ps <97>eF|grep...
It should read;
echo "`ps -eF|grep...
Even with ":set list" the only thing I see is <91> and <97>
I tried this and other ASCII characters to insert the back quote:
sed -e 's/'$(echo "97")'/`/g'
to no avail.
Either I'm doing this all wrong or using the wrong control values.
Can you suggest something else?
vi special-characters
asked Jun 27 at 18:22
Marinaio
898
898
what doeshexdumporxxdshow for the relevant contents of the script?
â thrig
Jun 27 at 18:39
0000002896 | ".ps .eF|grep "|
â Marinaio
Jun 27 at 19:15
Are they periods?
â Marinaio
Jun 27 at 19:15
add a comment |Â
what doeshexdumporxxdshow for the relevant contents of the script?
â thrig
Jun 27 at 18:39
0000002896 | ".ps .eF|grep "|
â Marinaio
Jun 27 at 19:15
Are they periods?
â Marinaio
Jun 27 at 19:15
what does
hexdump or xxd show for the relevant contents of the script?â thrig
Jun 27 at 18:39
what does
hexdump or xxd show for the relevant contents of the script?â thrig
Jun 27 at 18:39
0000002896 | ".ps .eF|grep "|
â Marinaio
Jun 27 at 19:15
0000002896 | ".ps .eF|grep "|
â Marinaio
Jun 27 at 19:15
Are they periods?
â Marinaio
Jun 27 at 19:15
Are they periods?
â Marinaio
Jun 27 at 19:15
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Looks like cp1252 (or similar). See What characters do not directly map from Cp1252 to UTF-8?. Use recode to repair it...
Thanks. Unfortunately recode isn't available on my system (neither is installing it)
â Marinaio
Jun 28 at 15:04
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Looks like cp1252 (or similar). See What characters do not directly map from Cp1252 to UTF-8?. Use recode to repair it...
Thanks. Unfortunately recode isn't available on my system (neither is installing it)
â Marinaio
Jun 28 at 15:04
add a comment |Â
up vote
0
down vote
Looks like cp1252 (or similar). See What characters do not directly map from Cp1252 to UTF-8?. Use recode to repair it...
Thanks. Unfortunately recode isn't available on my system (neither is installing it)
â Marinaio
Jun 28 at 15:04
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Looks like cp1252 (or similar). See What characters do not directly map from Cp1252 to UTF-8?. Use recode to repair it...
Looks like cp1252 (or similar). See What characters do not directly map from Cp1252 to UTF-8?. Use recode to repair it...
answered Jun 27 at 20:01
Thomas Dickey
49k583154
49k583154
Thanks. Unfortunately recode isn't available on my system (neither is installing it)
â Marinaio
Jun 28 at 15:04
add a comment |Â
Thanks. Unfortunately recode isn't available on my system (neither is installing it)
â Marinaio
Jun 28 at 15:04
Thanks. Unfortunately recode isn't available on my system (neither is installing it)
â Marinaio
Jun 28 at 15:04
Thanks. Unfortunately recode isn't available on my system (neither is installing it)
â Marinaio
Jun 28 at 15:04
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f452293%2fhow-do-i-remove-a-special-character-in-a-file%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
what does
hexdumporxxdshow for the relevant contents of the script?â thrig
Jun 27 at 18:39
0000002896 | ".ps .eF|grep "|
â Marinaio
Jun 27 at 19:15
Are they periods?
â Marinaio
Jun 27 at 19:15