[ale] vim set list not showing special characters seen with cat -vt

Lightner, Jeffrey JLightner at dsservices.com
Fri Jun 2 16:29:54 EDT 2017


The maddening thing was that for one user IT was displaying a special character in vim albeit a bit different than “cat –vt”

|### OBFUSCATE PLACEÂ |

The UTF8 triggered my memory – long ago I’d changed PuTTY to use the UTF8 character set as it displayed many things oddly otherwise for Linux systems.   I just modified my PuTTY to instead use translation “ISO-8859-1:1998 (Latin-1, West Europe)” which is what I think it had by default before I changed to UTF8.   Sure enough after doing that I see the same thing as that other user had seen.   It explains why he saw that even without doing “:set list” but I still don’t understand why UTF8 isn’t showing me SOMETHING is there.

From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Ed Cashin
Sent: Friday, June 02, 2017 3:27 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] vim set list not showing special characters seen with cat -vt

Lately vim seems too smart for its own good.

I installed ed to work with special characters lately, and it shows them as a sequence of bytes.  I thought that "-C" would cause vim to show a sequence of bytes in compatibility mode, but it still shows a spade in the example below.

Often, "sed -l filename" is handy.  It uses the same "l" command for "listing" that ed supports.  Note the "1l" command below, which means, "Go to line one and print a listing."

bash$ python3 -c "print('\u2660')" > spade.txt
bash$ vi !$
vi spade.txt
bash$ vi -C spade.txt
bash$ ed !$
ed spade.txt
4
1l
\342\231\240$
q
bash$



On Fri, Jun 2, 2017 at 3:01 PM, Lightner, Jeffrey <JLightner at dsservices.com<mailto:JLightner at dsservices.com>> wrote:
The internet has a thousand posts saying “:set list” will show hidden characters.

However that is NOT showing characters I know to be in the file:

If I do a “cat” with no flags on a file it contains a line (obfuscated to protect the guilty) like this:
ORDER_HEADER|OBFUSCATE|###########|##########|USD|OBFUSCATE|AA||OBFUSCATE|#### OBFUSCATE PARKWAY|OFUSCATE ###  SUITE ###||ATLANTA|GA|#####|###|######|USER at ADDRESS.COM<mailto:USER at ADDRESS.COM>|FIRST LAST |### OBFUSCATE PLACE ||CITY||ST|US||#####|##########|USER at ANOTHERADDRESS.COM<mailto:USER at ANOTHERADDRESS.COM>

The key field being:
|### OBFUSCATE PLACE |

If I run “cat –vt” on the file to show special characters and tabs I can see that field actually has extra hidden characters in it:
|### OBFUSCATE PLACEM-BM- |

If I do vim of the file the field appears as it did in cat without the “-vt” flags.

If I do “:set list” it shows me other characters (e.g. $ for each end of line) but does NOT show the extra characters seen for the above field that I see with “cat –vt”).

How do I get vim to show the same  characters in the field that I see with “cat –vt”?

When I ran “file” on this file it says it is “UTF-8 Unicode text” whereas usually files of this type (without the special characters) simply show they are “ASCII text”.   Presumably it is the special characters in this one that make it appear as UTF-8.   Doing :set options to change encoding to utf8 does NOT show the characters either.



CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you


_______________________________________________
Ale mailing list
Ale at ale.org<mailto:Ale at ale.org>
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo



--
  Ed Cashin <ecashin at noserose.net<mailto:ecashin at noserose.net>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20170602/40c4b3cc/attachment.html>


More information about the Ale mailing list