LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-20-2014, 11:59 PM   #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: 665

Rep: Reputation: Disabled
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, 12:02 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
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, 01: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: 665

Original Poster
Rep: Reputation: Disabled
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, 04:05 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Note: hex viewer is your friend (Midnight Command has a built-in: mcview <filename>; then F4)
 
Old 01-21-2014, 07: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: 665

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


Reply



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 10:58 PM
Weird Problem: Folder not visible vikas027 Linux - Server 4 08-07-2009 05:23 AM
two ISP and a weird LAN setting / services not visible from outside (routing problem) pe2338 Linux - Networking 2 01-31-2005 05:43 PM
MLDonkey_gui doesnt exist fedivh Linux - Software 34 02-07-2004 04:40 PM
mysql.sock doesnt exist radix Slackware 1 10-26-2003 06:11 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:25 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration