"Paulo J. Matos" <pocma...@gmail.com> writes: > As part of a testsuite script I am parsing GCC's output and I noticed > that format specifier %qs quotes the string by surrounding it with > unicode characters. I can't find where this %qs is defined so that I > can try and override it to quote with '%s' or `%s'. Anything but > unicode.
%qs is implemented by pp_base_format in pretty-print.c. Note that %q can be used with any format specifier, not just s. %q is implemented using the open_quote and close_quote variables, which are initialized by gcc_init_libintl in intl.c. If you are just interested in changing the quote characters that gcc prints when you run it, check your LANG environment variable. In normal use you will only see U+2018 and U+2019 if you are using a LANG which specifies utf8. Ian