Lurker News

Comments (96) 22 threads

TheAceOfHearts6 replies#
A bit tangential, here's a few unix utils you can use to inspect text:

`vis`: display non-printable characters in a visual format
`cat -e`: Display non-printing characters and display a dollar sign (`$') at the end of each line.
`hexdump -c`: Display the input offset in hexadecimal, followed by sixteen space-separated, three column, space-filled, characters of input data per line.
`od -a`: Output named characters.

pavelbr3 replies#
Is `hexdump` not `xxd`?
lainga#
`hexdump` is part of util-linux, `xxd` is not. They do the same thing though, up to formatting differences.
dotancohen#
And on Debian it's called `hd`.
gkya1 reply#
xxd is part of vim IIRC.
cyphar1 reply#
> `vis`: display non-printable characters in a visual format

Or `cat -v`, the namesake of http://cat-v.org/. :P

logicallee2 replies#
what is cat-v.org? (Obviously I visited that link, read the about page - I'm asking for your summary. it's still not clear to me after my initial visit.)
scbrg1 reply#
I'm sure there are better people to answer this question, but cat-v.org is the personal blog & collection of interesting stuff by former plan9 personality uriel (sadly no longer with us). It hosts random thoughts and lots of interesting stuff (including man pages) about plan9 and early unix systems, and miscellaneous other unix trivia.

It really is a treasure. Take the time to browse, it's well worth it if you're somewhat interested in unix history and not overly familiar with the subject already.

Continue this thread — 1 reply

gkya4 replies#
Nostalgic Unix nerds hating on everything that (i) was not in original Unix, or (ii) in Plan9, or (iii) not implemented by authors of these.

Continue this thread — 4 replies

agumonkey#
and under emacs whitespace-mode (just in case)
LVB2 replies#
Further tangent: a colleague and I talked about creating a derivative of one of the programmer fonts, replacing smart/curly quotes and another such nuisances with unmistakeable indicators.
sharpercoder#
This would be a useful feature for any programming font. I can totally imagine writing exploits through zero-width characters; smart insertion into interpreted strings (scanners/parsers) can potentially insert a security leak by an attacker. Though input can come from many places off course, this would at least make one vector visible.
peteretep#
You could probably just invert any non-ASCII character, and you could probably do this programmatically over an existing font.
wpietri#
Ooh! I adore `od`, and know too many options for it. But I didn't know about the others. Thanks!

I'll also add my favorite companion to `od` and hexdumps: `man ascii`.
P.S. May we please have a basic Markdown parser for HN?

Flimm#
Do you have any useful commands like these that can handle multi-byte characters in UTF-8? For instance, handling the zero-width space U+200B, which in UTF-8 takes up more than one byte. I've got some custom scripts that do, I was wondering if there was already something out there.
kerkeslager4 replies#
I agree with other users who said that it would be nice if this happened automatically instead of on click--I think after the initial novelty wore off, I'd probably forget to click it. It might be cleaner to just strip the non-printing characters and display a number of characters stripped, similar to how ad blockers display the number of ads blocked.
chpmrc1 reply#
I like the adblock analogy, might work on it, thanks.
Torn#
Please do, and publish as a real extension - I'd definitely use it
needToSay1 reply#
But that would be a performance killer or what?
kerkeslager#
I'd rather my browser did the right thing slowly than the wrong thing fast.
jannes1 reply#
How would you analyse content that's asynchronously loaded and inserted into the DOM?

I think DOM mutation observers would be a huge hit on performance.

kerkeslager#
I'd rather my browser did the right thing slowly than the wrong thing fast.
Aditya_Garg#
I think this extension has a very specific use case, particularly that you want to leak confidential information and you don't want it to trace back to you.

As others have mentioned, I could see this being used regularly by someone who plays Eve

Someone12344 replies#
It might make more sense as a clipboard filter.

If you're an English speaker that doesn't often handle languages which gain from zero width characters you could just have a listener scan your clipboard for zero-width characters, silently strip them, and then re-populate the clipboard.
Although I've been thinking about building a clipboard filter for Windows a lot lately, I'm getting tired of copying text to the address bar or notepad to strip text formatting information.

tomerico2 replies#
Ctrl+shift+v pastes without formatting
enzanki_ars1 reply#
Not on all apps though. Office apps do not respect that shortcut convention and require clicking on the "Paste Without Formatting" button.
MereInterest1 reply#
In Office, you can hit Ctrl after pasting, then "t" to select paste without formatting, which is nicer than switching from keyboard to mouse. The obnoxious thing is that, if the source text did not actually have formatting, then there is no menu that opens by Ctrl, and "t" is instead inserted verbatim. Wrecks havoc with my muscle memory, that I need to keep track of where I copied text from when pasting.

Continue this thread — 1 reply

irrational#
That just removes formatting. zero-width characters are not formatting so they wouldn't be removed. They are as real as the letter A - you wouldn't want ctrl+shift+v to remove all A's from your text, would you?
Alex39172 replies#
Zero width characters can also be used to force long strings of text to wrap correctly, so this may break the layout of sites that allow things like URLs in UGC text.
Someone12341 reply#
Why would a website flow through a user's clipboard?
teolandon#
they're talking about OP's extension that modifies how the website is presented. Not the clipboard idea.
EamonnMR#
In my experience, adding a zero width character into something that someone might copy/paste is generally a bad idea because it'll lead to some very irritated users having to manually remove them from copied data.
fouc#
The extension itself could just strip the characters during the copy action only perhaps
roel_v#
There is the puretext utility that strips formatting. Can't remember if it's open source so that you could add stripping zw chars.
ballenf4 replies#
It's starting to seem like the universe has some fundamental order for things that we can escape temporarily, but that are inescapable in the long run.

1. Photo and video evidence was a game-changer for establishing facts and chronologies. As we've seen, it's becoming harder and harder to distinguish fake photos and videos from real. It's not a stretch to predict a time when we'll only be able to make probabilistic statements about the veracity of photos or videos. (E.g., "60% liklihood of being undoctored.") This is probably already true about photos, although the expense of making a perfect fake is still pretty high, in terms of expertise.
I'd argue the "natural state" is one where word-of-mouth and first-hand accounts are the most authoritative evidence we can have (other than physical evidence like DNA left behind). And even physical evidence left behind can't tell us what the person did while there or how an event transpired.
2. Tracking communications. In the digital age, we've some people have come to assume that all digital text is untrackable and anonymous. Your "11001110" is the same as mine. Historically, it was pretty difficult to transcribe information without leaving traces of the origin of that info. These zero-width characters plus all the other text fingerprinting methods, and ubiquitous tracking in communication logs make it nearly impossible, again, to communicate with others without leaving a trail. And then there's the writing style analysis which makes it tough to write anything without leaving telltale fingerprints.
So, I'm proposing that we are returning to the "natural state" of things. Probably overstating things a bit, but still an interesting thought to consider.

dctoedt2 replies#
> ... the "natural state" is one where word-of-mouth and first-hand accounts are the most authoritative evidence we can have (other than physical evidence like DNA left behind)

First-hand accounts aren't always reliable.
https://en.wikipedia.org/wiki/Eyewitness_testimony

andrewmcwatters#
I think they're proposing more that these accounts are authentic, not necessarily reliable. It's common sense that eyewitness testimony isn't 100% reliable.
goldenkey#
DNA is pretty ironclad. What that article shows is that people in authoritative positions are fallible.

Continue this thread — 3 more replies

Load more comments