Live data from Hacker News

Don't touch my clipboard

alexanderell.is

111–120 of 322 posts

Re: Don't touch my clipboard

#111
post #68
post #33

Earlier quoted context omitted.

My go-to site for copying special symbols is Wikipedia, which is, of course, well-behaved: Dashes https://en.wikipedia.org/wiki/Dash Diacritics https://en.wikipedia.org/wiki/Diacritic Precomposed Latin characters https://en.wikipedia.org/wiki/List_of_precomposed_Latin_char... Currency symbols https://en.wikipedia.org/wiki/Currency_symbol Japanese typographic symbols https://en.wikipedia.org/wiki/List_of_Japanese_typo…

MS Word will autocorrect two hyphens into either an en dash or an em dash based on what it believes you were trying to type. So this: "em--dash" becomes this: "em—dash" while this: "en -- dash" becomes this: "en – dash"

On macOS

  ⌥- = en dash
 ⇧⌥- = em dash
where

   ⇧ = shift
   ⌥ = option
   - = hyphen

Re: Don't touch my clipboard

#112

Earlier quoted context omitted.

But they wouldn’t do what you wanted anyway if they were ASCII. What’s the problem specifically with them being Unicode?

The problem specifically is that they are not the ASCII quote character. There is only one ASCII quote character, and that's the one used by programming languages. Any other quote or quote-like character is outside the ASCII range, and must therefore be Unicode (or another non-ASCII code page).

I know they're not compatible with programming languages that you may want to use. But that's the languages' problem. They're perfectly valid, standardised, characters.

Re: Don't touch my clipboard

#113
post #99

Earlier quoted context omitted.

Because for some reason terminals are stuck in the 70ies and don't accept those characters as quotes. Anything but ASCII trips them up. Seems such an obvious interface to innovate, but it seems to run into terminal wizards sense of purity.

The problem, such as it is, is with languages. Terminals (mine at least) handle most of Unicode just fine; admittedly I've seen it choke on emoji, but punctuation, nah. The vast majority of programming languages are defined in terms of ASCII and only ASCII. I don't care for this, personally. I've given some thought to how to do quoting right in a programming language, and implemented «guillemets» as an experiment. Bu…

A language or interface is defined by the set of symbols mutually agreed upon. If you allow Unicode that number simply explodes, thus bloating and complicating the language/interface and its implementation as well. In effect it is no longer the same language but becomes a different, more complex one.

The tradeoff is not worth it for programming languages the same way as learning all the scripts of the world is not worth it for one human being, just to accomplish tasks that don't need all these symbols in the first place.

Re: Don't touch my clipboard

#114
To anyone that wants the short term solution, for this and other browser issues: https://github.com/pyllyukko/user.js/

1. use firefox, a browser that sold you just like chrome and safari, but at least kept the settings around.

2. use user.js above, which is a pretty crazy restrictive default, and then opt-in the features you need as you miss them. (it's just commenting out one line, no voodoo)

Re: Don't touch my clipboard

#115
post #93

Earlier quoted context omitted.

I think they are talking a about styled quotes, the kinds that point inward, which a REPL won't interpret as an ASCII quote and will throw some type of Syntax error.

Ok but those are standard, valid characters like any others. Why are they ‘horrid’?

Some people hate unicode quotes because lots of software will automatically convert ASCII quotes to them when you copy/paste your code to Slack or email to share with others.

Re: Don't touch my clipboard

#116
post #51

It's not just a browser thing. Apple Books does this with their e-books, which is infuriating if you're working with a coding book and just want to copy-paste stuff into your editor/terminal. You get something like: “ghci> putStrLn (pretty 10 value)” Excerpt From: Bryan O’Sullivan, John Goerzen, and Donald Bruce Stewart. “Real World Haskell.” Apple Books. When you only copied: ghci> putStrLn (pretty 10 value) Note th…

I hate this behavior! Switched to a different eBook reader on my iPad because of it. I like copying interesting snippets to OneNote.

Re: Don't touch my clipboard

#117
post #51

It's not just a browser thing. Apple Books does this with their e-books, which is infuriating if you're working with a coding book and just want to copy-paste stuff into your editor/terminal. You get something like: “ghci> putStrLn (pretty 10 value)” Excerpt From: Bryan O’Sullivan, John Goerzen, and Donald Bruce Stewart. “Real World Haskell.” Apple Books. When you only copied: ghci> putStrLn (pretty 10 value) Note th…

> aren't even the ASCII quote character; you get horrid unicode quotes Why should they be ASCII, and what’s wrong with Unicode?

Often in code environments, it's hard to tell the difference between " and “.

Re: Don't touch my clipboard

#118

Earlier quoted context omitted.

Ok but those are standard, valid characters like any others. Why are they ‘horrid’?

Because they result in a syntax error.

Even though the OP seems offended by the presence of the Unicode quote marks for some reason, they have nothing to do with the issue of Apple Books surrounding the copied text with those quote marks and adding an attribution line. If they'd surrounded the text with ASCII quote marks and added an attribution line, it would have still been a syntax error, wouldn't it.

Personally, I don't see any reason to hate typographically correct quote marks when used correctly, which (obviously) doesn't include code samples.

Re: Don't touch my clipboard

#119
You're giving sites permission to do this when you browse the web with browser that automatically executes whatever code it is sent. They're not forcing you, you're going there and you're asking for it and doing it yourself.

There's an easy solution. Stop. Don't run JS by default.

Re: Don't touch my clipboard

#120

I can read & write a language that I don't have a keyboard for (I use a standard US 101 key layout), so I work around this by cut & pasting single characters around to fix up the missing accent characters. Usually even a partially fixed word is enough for the spell checker to kick in and correct the rest, making this surprisingly fast. The thing that annoyed me recently is that if I cut & paste a single character in…

I've gotten into the habit of "pasting as plain text", i.e. cmd/ctrl+shift+v for any rich text editor.
Post reply on HN