LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-21-2014, 12:59 AM   #1
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 574

Rep: Reputation: 61
A weird character that actually doesnt exist but visible when you do a less or vi the


Hi guys,

So the thing arrived when i created an XML file out of an XLS, the column those had a trailing space (*by mistake left an space there) are replaced by a character like "|" (appears in bold) and does looked like a pipe'|' .
Code:
The file has email addresses like:
<EMAILADDR>ABC@XYZ.COM</EMAIL>
and the spaces entry is like:
<EMAILADDR>ABC@XYZ.COM| </EMAIL>
when i tried search for a trailing space in the file i came across this issue as if egrep didnt showed up anything:
Code:
egrep -i 'COM[ \t]|NET[ \t]|ORG[ \t]|IN[ \t]' filename
i tried searching for a pipe character but again nothing!!
when i copied that particular line and pasted in UI editor it was just an space and nothing else there!! but visible on console :P some ghost character!!! :P
Anyone have any idea what was this behavior like and how to get rid of it??
 
Old 01-21-2014, 01:02 AM   #2
astrogeek
Senior Member
 
Registered: Oct 2008
Distribution: Slackware: 12.1, 13.1, 14.1, 64-14.1, -current, FreeBSD-10
Posts: 2,029

Rep: Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802
Place the cursor on it in vim command mode and type ga to see what it is (shown at bottom of vi window).
 
1 members found this post helpful.
Old 01-21-2014, 02:56 AM   #3
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 574

Original Poster
Rep: Reputation: 61
Just figured it out ""it seeems the xls to xml conversion have translated some color code or hyperlink to that one:

Code:
grep --color='auto' -P -n "[\x80-\xFF]" <XML-Name>
does it all for me.

Thanks @astrogeek
 
Old 01-21-2014, 05:05 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,891

Rep: Reputation: 522Reputation: 522Reputation: 522Reputation: 522Reputation: 522Reputation: 522
Note: hex viewer is your friend (Midnight Command has a built-in: mcview <filename>; then F4)
 
Old 01-21-2014, 08:38 PM   #5
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 574

Original Poster
Rep: Reputation: 61
Thats something new, will try that. Thanks @NevemTeve
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] invisible character under Windows but visible under LINUX thomas2004ch Linux - Software 4 09-18-2013 11:58 PM
Weird Problem: Folder not visible vikas027 Linux - Server 4 08-07-2009 06:23 AM
two ISP and a weird LAN setting / services not visible from outside (routing problem) pe2338 Linux - Networking 2 01-31-2005 06:43 PM
MLDonkey_gui doesnt exist fedivh Linux - Software 34 02-07-2004 05:40 PM
mysql.sock doesnt exist radix Slackware 1 10-26-2003 07:11 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration