From 4b3598d36e982f498fb9fbfad720802cf351efba Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Wed, 29 Apr 2026 12:52:49 +0700 Subject: [PATCH] build: pin UTF-8 input/exec charset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sources contain UTF-8 string literals (signal bars, ✕, ★, ✔, …). Without an explicit charset, GCC honors LC_ALL/LANG at compile time, so a build under a non-UTF-8 locale can mangle them. Probe the flags with cc.get_supported_arguments so older/other compilers stay happy. Co-Authored-By: Claude Opus 4.7 (1M context) --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index 718947c..6d929ef 100644 --- a/meson.build +++ b/meson.build @@ -13,8 +13,12 @@ module_arch = enlightenment.get_variable(pkgconfig: 'module_arch', default_value: 'linux-gnu-@0@'.format(host_machine.cpu())) module_dir = join_paths(get_option('libdir'), 'enlightenment', 'modules', 'iwd') +utf8_args = cc.get_supported_arguments(['-finput-charset=UTF-8', + '-fexec-charset=UTF-8']) + add_project_arguments('-DPACKAGE="e_iwd"', '-DPACKAGE_VERSION="@0@"'.format(meson.project_version()), + utf8_args, language : 'c') subdir('src')