Commit 0affed79 authored by Lennart Poettering's avatar Lennart Poettering
Browse files

localctl: skip locale entries with non-UTF8 names

glibc should place these in the locale archive. For now, let's just skip
them from our output, since they are aliases anyway.
parent 1ef2af5a
......@@ -37,6 +37,7 @@
#include "pager.h"
#include "set.h"
#include "path-util.h"
#include "utf8.h"
static bool arg_no_pager = false;
static enum transport {
......@@ -359,6 +360,9 @@ static int add_locales_from_archive(Set *locales) {
if (e[i].locrec_offset == 0)
if (!utf8_is_valid((char*) p + e[i].name_offset))
z = strdup((char*) p + e[i].name_offset);
if (!z) {
r = log_oom();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment