Don't touch my clipboard
191–200 of 322 posts
Re: Don't touch my clipboard
#192Re: Don't touch my clipboard
#193Earlier quoted context omitted.
Because the next step when you face this problem is doing a search-replace of the quotes to remove them. ASCII quotes are on your keyboard, so you can actually type the command to remove them. Unicode quotes probably aren't, so it's extra annoying to remove them, and they're not even the same character for start and end so you have to do it twice. The time spent for removal is then vastly higher than with ASCII quote…
PowerShell acknowledged smart quotes and dashes in its language design and allows proper quotes interchangeably with ASCII straight quotes. I always found that an interesting design choice, although I'm not sure how useful it actually is to allow people to copy/paste code from dubious web pages. On the other hand, they'll do that anyway, so why bother making it harder?
(The Unicode quotes also mostly come in matching pairs, so, for good or for ill, they'd in principle be nestable.)
Re: Don't touch my clipboard
#194Earlier quoted context omitted.
Not exactly the same. Since anything inside ASCII quotes is typically considered a valid string in most programming languages, if you delete everything after the final quotation mark you have a syntactically valid program. It won't do what you want, but it's not a syntax error. So unicode quotes and ASCII quotes are not exactly the same in this scenario.
They both break what you were trying to do, and the fact that they do it in slightly different ways really isn't worth making a long pedantic argument about.
The second is that there's a significant difference between "won't run due to syntax errors" and spitting a pasted line back at you since it thinks it's just a string. In a less robust environment the first option might actually crash your environment, or leave you with subtle errors. Like in a shell, it might treat things like escape sequences and things will look off unless you reset them.
Re: Don't touch my clipboard
#195Earlier quoted context omitted.
That seems like an obviously bad solution. That is like writing [a(b{c]d}e) except that the quote characters look even more similar.
Its easy (solved) to map Unicode to control characters such as quotes (and when you think about it, quotes are often there to deal with ambiguities stemming from the limited number of allowed characters in ASCII). So to could have a terminal accepting such input, and a few helper function that normalize it into ASCII and so on. After all, users of non-ascii languages (which is nearly everyone) already know how to dea…
If you are going to get rid of it anyways, why bother with it in the first place? Also, you then have the ambiguity/problem whether some symbols are mapped to the same ones or not.
> already know how to deal with it without ambiguity
I wish. Just dealing with ü vs ue vs \"u and ascii, win something, utf8 and utf16 is still annoying in practice. Or latex choking on accents, non-breaking whitespace or similar fun stuff.
Re: Don't touch my clipboard
#196Re: Don't touch my clipboard
#197Earlier quoted context omitted.
So trade those apps not working for immunity from JavaScript clipboard hijacking? I'd be 110% fine with that trade and nothing of value to me would be lost. Is it possible in Firefox? Anyone know?
Millions of people use applications with these kinds of features. A few more examples: the Scratch educational programming tool, website builders such as Webflow, diagram editors, image editors, etc. The list goes on and on. The browser is no longer just a document viewer... That ship has sailed, and overall it is a good thing. We can mitigate the risk of clipboard hijacking without burning down the house. By the way…
No, it really isn't. Web apps and documents using the same underlying technologies doesn't mean they have to be accessed through a single frontend that provides the worst of both worlds.
Re: Don't touch my clipboard
#198It'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…
Excerpt From: Bryan O’Sullivan,Re: Don't touch my clipboard
#199 Excerpt From: Bryan O’Sullivan,Re: Don't touch my clipboard
#200Earlier quoted context omitted.
Because the next step when you face this problem is doing a search-replace of the quotes to remove them. ASCII quotes are on your keyboard, so you can actually type the command to remove them. Unicode quotes probably aren't, so it's extra annoying to remove them, and they're not even the same character for start and end so you have to do it twice. The time spent for removal is then vastly higher than with ASCII quote…
It's not changing quotes in the code. It is adding quotes. You have to delete them, not search-and-replace them, and it doesn't matter what kind of quotes they are, you have to do the exact same thing.