5 ms·
This is another good reason to have a text editor you really trust, which can show you these things. Whether it's different line-endings or weird invisible spac
by interroboink 4y ago
This is another good reason to have a text editor you really trust, which can show you these things. Whether it's different line-endings or weird invisible space stuff, I know I can just open it in Vim and figure out what's really going on pretty quickly. Wasted a lot of time earlier in my life on that nonsense (:
- TacticalCoder 4y agoI agree with you. I've got my Emacs set up to display in "bold, fluo foregound and a dark background underlined by a pink line" (yes, literally that obnoxious) any character which is not part of a list of characters I consider to be acceptable. And it's configured to show any "zero width" character as if it had a width. So any "invisible character" as well as any "invisible zero width character" does appear as a black square, underlined with a pink line. And that for any buffer/file.
- enchiridion 4y agoCan you share that config? Sounds useful!
- TacticalCoder 4y agoSure... For a start I have my scratch buffer showing a few Unicode characters, one trailing spacing character on purpose (to be sure I can see it's highlighted), a zero-width-non-joiner 0x200C and an Hangul filler 0x3164 (may add some from TFA btw). This helps me quickly verify, upon startup, that my setup is working. I configured all that literally years ago so I don't remember where's what but here's what I've got: ;; probably cargo-culted from somewhere (update-glyphless-char-display 'glyphless-char-display-control '((format-control . empty-box) (no-font . empty-box))) ;; See https://emacs.stackexchange.com/questions/65108 (set-face-background 'glyphless-char "purple") And then I've got this too (requires markchars.el): (markchars-global-mode) With: (defface markchars-heavy '((t :underline "magenta")) "Heavy face for `markchars-mode' char marking." :group 'markchars) It should get you started. (and, yup, I know it's overkill but I like it that way)
- userbinator 4y agoI use a DOS text editor for this, where no Unicode support is an advantage. The majority of the time I'm dealing with plain ASCII anyway.
- deleted 4y ago[deleted]
- nervuri 4y agoVim does not display them all. The only program I checked which displays all such characters is `less -U`. You can test using this file: https://gitlab.com/nervuri/nervuri.net/-/raw/master/gopher/zero-width.txt https://gitlab.com/nervuri/nervuri.net/-/raw/master/gopher/z...
- interroboink 4y agoThanks for this! Good to add to the ol' repertoire (: Looks like the only one Vim misses is U+17B5? Though it there could be more not listed there. Unicode is a deep dark forest. ---- For others readers, here's a non-gopher version of the article linked inside: https://nervuri.net/stega https://nervuri.net/stega
- nervuri 4y agoAlso 061C, E0001, E0020...E007F. And probably others, yes. The list at https://invisible-characters.com/ https://invisible-characters.com/ might contain more. > Unicode is a deep dark forest. Oh, indeed.