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 <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Tan committed Jun 14, 2023 at 14:31 UTC f0b68f0546a44e2bc3a764bd75b3aa4418c01601
1 file changed +4
Documentation/CodingGuidelines
+4
@@ -188,6 +188,10 @@ For shell scripts specifically (not exhaustive):
188 hopefully nobody starts using "local" before they are reimplemented
189 in C ;-)
190
191 + - Use octal escape sequences (e.g. "\302\242"), not hexadecimal (e.g.
192 + "\xc2\xa2") in printf format strings, since hexadecimal escape
193 + sequences are not portable.
194 +
195
196 For C programs:
197