lists at wrant.com
2015-Jul-07 02:43 UTC
[PATCH v2 1/1] paint visual host key with unicode box-drawing characters
A machine diff between one using ASCII and UTF-8 would yield not equal? Is it reasonable to only use UTF-8 ("pretty" chars) with a command line switch (forced) rather than as an override (implied) behaviour?
Christian Hesse
2015-Jul-07 08:17 UTC
[PATCH v2 1/1] paint visual host key with unicode box-drawing characters
lists at wrant.com on Tue, 2015/07/07 05:43:> A machine diff between one using ASCII and UTF-8 would yield not equal?True. Do you need diffs of the artwork? I suppose this broke several times in the past...> Is it reasonable to only use UTF-8 ("pretty" chars) with a command line > switch (forced) rather than as an override (implied) behaviour?Just another idea... We could print unicode characters only when a real terminal is detected.
Nico Kadel-Garcia
2015-Jul-07 12:49 UTC
[PATCH v2 1/1] paint visual host key with unicode box-drawing characters
On Mon, Jul 6, 2015 at 10:43 PM, <lists at wrant.com> wrote:> A machine diff between one using ASCII and UTF-8 would yield not equal? > > Is it reasonable to only use UTF-8 ("pretty" chars) with a command line > switch (forced) rather than as an override (implied) behaviour?Please, lordie, yes. Unicode is *not your friend* for any kind of binary or, in this case, display comparisons. It multiplies the complexity of the relevant code.
Christian Hesse
2015-Jul-07 13:23 UTC
[PATCH v2 1/1] paint visual host key with unicode box-drawing characters
Jim Knoble <jmknoble+kleankanteen at pobox.com> on Tue, 2015/07/07 05:58:> It's not difficult to set LANG=C (or LANG=POSIX) in ssh's enviroment. That > should force ASCII.LC_CTYPE=C should be sufficient.> Otherwise, UTF8 should be used wherever possible (and > LANG permits), not just for a terminal, IMHO.What comes to mind is pstree. Running it in a terminal you get a tree of unicode characters, piping (or redirecting) you get ascii characters. Basically it is a matter of preference. I would prefer ascii for a non-terminal to make sure you can view a redirected text file without issue even if unicode is not supported. -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);} -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20150707/c328edd2/attachment-0001.bin>
Daniel Kahn Gillmor
2015-Jul-08 21:58 UTC
[PATCH v2 1/1] paint visual host key with unicode box-drawing characters
On Mon 2015-07-06 22:43:18 -0400, lists at wrant.com wrote:> A machine diff between one using ASCII and UTF-8 would yield not equal?anyone doing a machine diff should be doing a machine diff of the raw public key material in the first place, no? The ssh "visual host key" artwork is for human consumption. i'm rather dubious about it its security properties, i confess, but i don't think there is any reasonable context in which it should be machine-interpreted. --dkg -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 948 bytes Desc: not available URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20150708/7fbfda4a/attachment.bin>
lists at wrant.com
2015-Jul-09 00:46 UTC
[PATCH v2 1/1] paint visual host key with unicode box-drawing characters
Instead of proposing encoding changes of output that would require a tool to sanitise the resulting from these experiments, why not consider using a tool outside SSH code to produce the pretty print in the first place?