The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
In memoriam: Linux evangelist and Linux.com editor Joe Barr iBot UNIX and Linux RSS News 0 07-11-2008 12:40 PM
PING - Unknown host 127.0.0.1, Unknown host localhost - Solaris 10 Przemek SUN Solaris 4 05-25-2008 09:11 PM
Leading Editor Contemplates Defection From Microsoft Vista to Linux - SYS-CON Media iBot UNIX and Linux RSS News 0 08-18-2007 01:00 PM
C++ Editor for Linux MD9.1 Arendo High Level Programming 9 12-15-2003 04:57 AM
underline character in vi editor Melissa UNIX for Dummies Questions & Answers 2 02-05-2002 06:27 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 10-02-2008
Registered User
 

Join Date: Oct 2008
Posts: 6
<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,


Reply With Quote
Forum Sponsor
  #2  
Old 10-02-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
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~
Reply With Quote
  #3  
Old 10-02-2008
Registered User
 

Join Date: Oct 2008
Posts: 6
Thanks Era for the reply. The command did not replace the <92> character. Any reason?
Reply With Quote
  #4  
Old 10-02-2008
Registered User
 

Join Date: Oct 2008
Posts: 6
Hi Era, Sorry the command worked. I was looking in to the Original File instead. Thanks so much.
Reply With Quote
  #5  
Old 10-06-2008
Registered User
 

Join Date: Oct 2008
Posts: 6
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,
Reply With Quote
  #6  
Old 10-06-2008
vidyadhar85's Avatar
The Tutor
 

Join Date: Jun 2008
Location: INDIA
Posts: 537
you can't copy that character?? then how did you pasted it in forum??
Reply With Quote
  #7  
Old 10-06-2008
Registered User
 

Join Date: Oct 2008
Posts: 3
Hi,

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

take a look here
Changing Special Characters Using Sed

Hope this helps you..
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0