<92> unknown character when opened with Vi editor in Linux


 
Thread Tools Search this Thread
Operating Systems Linux SuSE <92> unknown character when opened with Vi editor in Linux
# 1  
Old 10-02-2008
<92> unknown character when opened with Vi editor in Linux

Hi,

One of our applications has this string :
xxx ¿ yyyyy
We are on Linux Suse and the character set is en_US.UTF-8. Our requirement is to replace this special character ¿ with a space. When we open the file containing this string using VI editor we see the same character as <92>

xxx <92> yyyyy
When we try to replace <92> with space using sed command, its not able to recognize this character <92> and so its not able to replace it.

Please advice on how to replace this unknown character/code

Thanks,


# 2  
Old 10-02-2008
Code:
perl -i~ -pe 's/\x92/ /' filename

There are many other ways but many of them are not entirely portable. If you have Perl, this should work without modification. The original file will be saved as filename~
# 3  
Old 10-02-2008
Thanks Era for the reply. The command did not replace the <92> character. Any reason?
# 4  
Old 10-02-2008
Hi Era, Sorry the command worked. I was looking in to the Original File instead. Thanks so much. Smilie
# 5  
Old 10-06-2008
Replacing ¿ special character on Linux

We are on Linux Suse. One of our application has this string XXX ¿ YYY in the data file. I think it was entered through some spanish keyboard. But we want to replace this character with a space before we send the file to other applications.

I opened the file using Vi Editor .I thought first of all i need to copy this character and use the command
sed 's/¿/ /g' to replace the character with a space. But i couldn't even copy this character.

Please advice.

Thanks,
# 6  
Old 10-06-2008
you can't copy that character?? then how did you pasted it in forum??
# 7  
Old 10-06-2008
Hi,

Will suggest you to search well first before putting a question. This is already answered earlier

take a look here
https://www.unix.com/shell-programmin...using-sed.html

Hope this helps you..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

iptables producing 'Unknown error 18446744073709551615' inRed Hat Enterprise Linux Server 5.5

Creating a large number of rules such as 100000, iptables will produce errors after 42000 rules "iptables: Unknown error 18446744073709551615". But another machine where i have debian virtual machine I can easily run the sciprt of 100000 of rules I am waiting for your reply 4.... (1 Reply)
Discussion started by: tahirfattani
1 Replies

2. UNIX for Dummies Questions & Answers

Ctrl-V + Ctrl-J for newline character does not work inside vi editor

Hi friends, I am trying to add a newline char ('\n') between the query and the commit statement in the following shell script. #! /bin/sh echo "select * from tab; commit;" > data.sql I have tried typing in "Ctrl-V + Ctrl-J" combination which has inserted ^@ (NUL) character but the commit... (1 Reply)
Discussion started by: royalibrahim
1 Replies

3. Shell Programming and Scripting

File exists, but cannot be opened.How to check- whether it could be opened to read when it exists

Hi #Testing for file existence if ; then echo 'SCHOOL data is available for processing' else echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING' : i wrote a script, where it begins by checking if file exists or not. If it exists, it truncates the database... (2 Replies)
Discussion started by: rxg
2 Replies

4. UNIX for Advanced & Expert Users

mount unknown (linux) image

I want to buy an ereader described known among others as MDB-106 described here: ambiancetechnology . com . Because I promissed myself never to buy anything (again) that is closed I am trying to see how open it is. It states there there is Linux 2.6 inside. Also some software updates can be... (8 Replies)
Discussion started by: rocus
8 Replies

5. Shell Programming and Scripting

@ character in vi editor

Hi, I have received a file from in ASCII format. When I am viewing in the vi editor I could see the content like below 000700006098204 983004100 09910LATINA 09920LT 09930380 @ ... (4 Replies)
Discussion started by: Satyak
4 Replies

6. UNIX for Advanced & Expert Users

Number of files currently opened in linux

Hello, How do i check number of files currently opening in the linux server? Your help is highly appreciated. Thank you ---------- Post updated at 02:43 PM ---------- Previous update was at 02:19 PM ---------- never mind!! I got it. ---------- Post updated at 02:44 PM ---------- Previous... (3 Replies)
Discussion started by: govindts
3 Replies

7. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

8. Programming

C++ Editor for Linux MD9.1

What is the best C++ editor that works under MD9.1? I know the question is more of a personal opinion, but it's more meant for me to see what program would be best to install. Also, does C++ under a unix-based OS work differently then under windows? Because I've learned C++ for windows and want... (9 Replies)
Discussion started by: Arendo
9 Replies

9. UNIX for Dummies Questions & Answers

underline character in vi editor

I want to print a man page for a command in unix, this is what I did man command > command.txt but when I view the output file command.txt I found there are lot of _^H characters that in the man page are actually underline character, how can I replace this _^H with underline character? ... (2 Replies)
Discussion started by: Melissa
2 Replies
Login or Register to Ask a Question