3 ms·
The problem is search functions. Unicode has been standard for awhile; I seem to recall some open source normalization-of-punctuation code. If your search func
by wolverine876 3y ago
The problem is search functions. Unicode has been standard for awhile; I seem to recall some open source normalization-of-punctuation code.
If your search function/engine doesn't find all the horizontal lines characters when the user types ASCII hyphen-minus, you're generating false-negatives.
Isn't there some open source code that takes care of this universal problem? It's not just hyphen/minus/dashes. There are quotation marks, diacritics, and more.
- dzaima 3y agoThere's the counter-issue of trying to search for some specific character, and instead matching the generic one. For example, searching "ā" on chrome or firefox finds all "a"s, which is extremely annoying if there's one "ā" on a page you want to find, and thousands of "a"s everywhere. For dashes, if done right, it could be useful to be able to search the separate ones too - i.e. search for flag dashes but not ones in prose.
- bradrn 3y ago> For example, searching "ā" on chrome or firefox finds all "a"s, which is extremely annoying if there's one "ā" on a page you want to find, and thousands of "a"s everywhere. For reference, the ‘match diacritics’ option on Firefox toggles this behaviour. (It’s slightly misnamed, actually, since it’s more expansive than just diacritics: it also matches things like Unicode dashes for ASCII dashes, and so on.)
- dzaima 3y agoAh right, Firefox does have a nice option for this. I happened to check Chromium on desktop, but Firefox on Android (which were the browsers I had open already), which doesn't have this option.
- duskwuff 3y ago> The problem is search functions. No, that's not it; there are some further issues mentioned in the thread and the linked bug reports, like man pages containing command line options that can't be copy/pasted into a terminal (because they consist of Unicode hyphens).
- emmelaich 3y agoThat too perhaps, but they really are a simple hyphen and should not be changed. If I'm reading a man page via `less`, I want find the next option with a simple search function i.e. /-
- wolverine876 3y agoYes, I was speaking more generally about this sort of problem.