On system with LANG not defined getenv will return null.
An example of such system is the lava runner used by ci.lttng.org.
https://ci.lttng.org/view/System%20Tests/
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
if (program_locale && strstr(program_locale, "utf8")) {
utf8_output_supported = true;
- } else if (strstr(lang, "utf8")) {
+ } else if (lang && strstr(lang, "utf8")) {
utf8_output_supported = true;
}
}