From 9b16ff929ec227a76ae4cbe0c630a6a7a796fa76 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:41:20 +0100 Subject: [PATCH] set locales in the test clients so that they can deal with non-ASCII characters, e.g. accented characters, properly.[skip ci] --- shairport-sync-dbus-test-client.c | 5 +++-- shairport-sync-mpris-test-client.c | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shairport-sync-dbus-test-client.c b/shairport-sync-dbus-test-client.c index b95f2a47..3a537788 100644 --- a/shairport-sync-dbus-test-client.c +++ b/shairport-sync-dbus-test-client.c @@ -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 @@ -28,6 +28,7 @@ #include #include #include +#include GMainLoop *loop; @@ -99,7 +100,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 */ diff --git a/shairport-sync-mpris-test-client.c b/shairport-sync-mpris-test-client.c index 5606a48b..2dbfd524 100644 --- a/shairport-sync-mpris-test-client.c +++ b/shairport-sync-mpris-test-client.c @@ -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 #include #include +#include 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 */