set locales in the test clients so that they can deal with non-ASCII characters, e.g. accented characters, properly.[skip ci]

This commit is contained in:
Mike Brady
2026-06-03 14:42:36 +01:00
parent 1cbbeec584
commit 9b16ff929e
2 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -1,6 +1,6 @@
/*
* This file is part of Shairport Sync.
* Copyright (c) Mike Brady 2019--2025
* Copyright (c) Mike Brady 2019--2026
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <locale.h>
GMainLoop *loop;
@@ -75,6 +76,7 @@ void *dbus_thread_func(__attribute__((unused)) void *arg) {
}
int main(int argc, char *argv[]) {
setlocale(LC_ALL, "");
GBusType gbus_type_selected = G_BUS_TYPE_SYSTEM; // set default
// get the options --system or --session for system bus or session bus
signed char c; /* used for argument parsing */