context->includes_seen = NULL;
context->m_client_data_hooks = NULL;
context->m_diagrams.m_theme = NULL;
- diagnostics_text_art_charset_init (context,
- DIAGNOSTICS_TEXT_ART_CHARSET_DEFAULT);
+
+ enum diagnostic_text_art_charset text_art_charset
+ = DIAGNOSTICS_TEXT_ART_CHARSET_DEFAULT;
+ if (const char *lang = getenv ("LANG"))
+ {
+ /* For LANG=C, don't assume the terminal supports anything
+ other than ASCII. */
+ if (!strcmp (lang, "C"))
+ text_art_charset = DIAGNOSTICS_TEXT_ART_CHARSET_ASCII;
+ }
+ diagnostics_text_art_charset_init (context, text_art_charset);
}
/* Maybe initialize the color support. We require clients to do this
U+26A0 WARNING SIGN followed by U+FE0F VARIATION SELECTOR-16 to select the
emoji variant of the character).
-The default is @samp{emoji}.
+The default is @samp{emoji}, except when the environment variable @env{LANG}
+is set to @samp{C}, in which case the default is @samp{ascii}.
@opindex fdiagnostics-format
@item -fdiagnostics-format=@var{FORMAT}