summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5e22e21)
raw | patch | inline | side by side (parent: 5e22e21)
author | Petr Baudis <pasky@suse.cz> | |
Wed, 1 Oct 2008 20:11:54 +0000 (22:11 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 3 Oct 2008 00:16:50 +0000 (17:16 -0700) |
For the last 30 years, the mankind uses the octal representation of
characters only in rare cases and most character codes are hardly
recognizable in octal. In contrast, many programmers still know
hexadecimal well and that is also the representation of choice e.g.
for Unicode codepoints.
Signed-off-by: Petr Baudis <petr.baudis@novartis.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
characters only in rare cases and most character codes are hardly
recognizable in octal. In contrast, many programmers still know
hexadecimal well and that is also the representation of choice e.g.
for Unicode codepoints.
Signed-off-by: Petr Baudis <petr.baudis@novartis.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 18e70a366333fffbadd37a7fbe509b4c33f9421f..eb2943a530189325407d83d12f22ca3494524866 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
);
my $chr = ( (exists $es{$cntrl})
? $es{$cntrl}
- : sprintf('\%03o', ord($cntrl)) );
+ : sprintf('\%2x', ord($cntrl)) );
if ($opts{-nohtml}) {
return $chr;
} else {