From 8aa7cfcb96bfdfc1ba03b5382e686d3a2fd29338 Mon Sep 17 00:00:00 2001 From: Christopher Wellons Date: Fri, 25 Sep 2026 20:38:11 -0400 Subject: [PATCH] Build PDCurses with PDC_FORCE_UTF8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without it, PDCurses decodes narrow strings with the CRT's mbtowc(), which follows LC_CTYPE. When GDB 18.1 selects a UTF-8 host charset it calls setlocale(LC_CTYPE, "C"), so in the TUI each byte of a UTF-8 sequence became its own character: π (CF 80) displayed as Ï. PDC_FORCE_UTF8 makes PDCurses decode UTF-8 itself, independent of the locale. Its decoder covers only the BMP. ccmake links the same library and gets the same behavior. Co-Authored-By: Claude Opus 5.5 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fd79df1..627fa7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -656,7 +656,7 @@ COPY --from=dl-pdcurses /dl/pdcurses /dl/pdcurses WORKDIR /dl/pdcurses RUN make -j$(nproc) -C wincon \ - CC=$ARCH-gcc AR=$ARCH-ar CFLAGS="-I.. -O2 -DPDC_WIDE" pdcurses.a \ + CC=$ARCH-gcc AR=$ARCH-ar CFLAGS="-I.. -O2 -DPDC_WIDE -DPDC_FORCE_UTF8" pdcurses.a \ && mkdir -p /deps/lib /deps/include \ && cp wincon/pdcurses.a /deps/lib/libcurses.a \ && cp curses.h /deps/include/curses.h