From 4a8a6aeee88240e35bd14a78cf6dc7efa67f7ffd Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 22 May 2024 11:50:09 -0500 Subject: image: tar backend: Set C++ locale to C.UTF-8 This ensures that boost::filesystem uses UTF-8 for filenames. Closes: #381 --- image/backends/tar.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/image/backends/tar.cc b/image/backends/tar.cc index 1f9c631..19d2049 100644 --- a/image/backends/tar.cc +++ b/image/backends/tar.cc @@ -44,7 +44,9 @@ public: TarBackend(const std::string &ir, const std::string &out, const std::map &opts, CompressionType _c = None) - : BasicBackend{ir, out, opts}, comp{_c} {}; + : BasicBackend{ir, out, opts}, comp{_c} { + std::locale::global(std::locale("C.UTF-8")); + }; int prepare() override { int res; -- cgit v1.2.3-60-g2f50