{"thread":{"id":"43823","subject":"[PATCH] gitweb: Quote non-displayable characters in hex, not octal","startedAt":"2008-10-01T20:11:54Z","lastAt":"2008-10-01T20:11:54Z","messageCount":1,"participants":["Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"299075","messageId":"1222891914-24012-1-git-send-email-pasky@suse.cz","threadId":"43823","inReplyTo":null,"subject":"[PATCH] gitweb: Quote non-displayable characters in hex, not octal","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2008-10-01T20:11:54Z","receivedAt":"2008-10-01T20:11:54Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"For the last 30 years, the mankind uses the octal representation of\ncharacters only in rare cases and most character codes are hardly\nrecognizable in octal. In contrast, many programmers still know\nhexadecimal well and that is also the representation of choice e.g.\nfor Unicode codepoints.\n\nSigned-off-by: Petr Baudis <petr.baudis@novartis.com>\n\n---\n gitweb/gitweb.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex da474d0..1b5aa14 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -775,7 +775,7 @@ sub quot_cec {\n \t);\n \tmy $chr = ( (exists $es{$cntrl})\n \t\t    ? $es{$cntrl}\n-\t\t    : sprintf('\\%03o', ord($cntrl)) );\n+\t\t    : sprintf('\\%2x', ord($cntrl)) );\n \tif ($opts{-nohtml}) {\n \t\treturn $chr;\n \t} else {\n-- \ntg: (c427559..) t/misc/quot-hex (depends on: vanilla/master)\n"}]}