1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2026-10-23 06:08:56 +03:00

Build PDCurses with PDC_FORCE_UTF8

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 <noreply@anthropic.com>
This commit is contained in:
Christopher Wellons
2026-09-25 20:38:11 -04:00
parent fa8f34ae76
commit 8aa7cfcb96

View File

@@ -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