standards: Quote Characters

1 
1 5.10 Quote Characters
1 =====================
1 
1 In the C locale, the output of GNU programs should stick to plain ASCII
1 for quotation characters in messages to users: preferably 0x22 ('"') or
1 0x27 (''') for both opening and closing quotes.  Although GNU programs
1 traditionally used 0x60 ('`') for opening and 0x27 (''') for closing
1 quotes, nowadays quotes '`like this'' are typically rendered
1 asymmetrically, so quoting '"like this"' or ''like this'' typically
1 looks better.
1 
1    It is ok, but not required, for GNU programs to generate
1 locale-specific quotes in non-C locales.  For example:
1 
1      printf (gettext ("Processing file '%s'..."), file);
1 
1 Here, a French translation might cause 'gettext' to return the string
1 '"Traitement de fichier < %s >..."', yielding quotes more appropriate
1 for a French locale.
1 
1    Sometimes a program may need to use opening and closing quotes
1 directly.  By convention, 'gettext' translates the string '"`"' to the
1 opening quote and the string '"'"' to the closing quote, and a program
1 can use these translations.  Generally, though, it is better to
1 translate quote characters in the context of longer strings.
1 
1    If the output of your program is ever likely to be parsed by another
1 program, it is good to provide an option that makes this parsing
1 reliable.  For example, you could escape special characters using
1 conventions from the C language or the Bourne shell.  See for example
1 the option '--quoting-style' of GNU 'ls'.
1