From: Jonathan Tan Date: Wed, 14 Jun 2023 21:31:45 +0000 (-0700) Subject: CodingGuidelines: use octal escapes, not hex X-Git-Tag: v2.42.0-rc0~97^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0b68f0546a44e2bc3a764bd75b3aa4418c01601;p=thirdparty%2Fgit.git CodingGuidelines: use octal escapes, not hex Extend the shell-scripting section of CodingGuidelines to suggest octal escape sequences (e.g. "\302\242") over hexadecimal (e.g. "\xc2\xa2") since the latter can be a source of portability problems. Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 003393ed16..39ef53c237 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -188,6 +188,10 @@ For shell scripts specifically (not exhaustive): hopefully nobody starts using "local" before they are reimplemented in C ;-) + - Use octal escape sequences (e.g. "\302\242"), not hexadecimal (e.g. + "\xc2\xa2") in printf format strings, since hexadecimal escape + sequences are not portable. + For C programs: