On Thu, Jan 22, 2026 at 03:19:08PM +0200, Eli Zaretskii wrote:
> Thanks, this seems to work well in my testing (I paged through the
> ELisp manual, which uses Unicode characters). "make check" also
> succeeds if I add "raw-utf8-output=On" to info/t/config/texinfo/infokey.
>
> I was thinking of turning this on by default if nl_langinfo returns
> "UTF-8". WDYT?
Here's code you could try in pcterm.c:
diff --git a/info/pcterm.c b/info/pcterm.c
index bfba58fdda..720ac9b5ad 100644
--- a/info/pcterm.c
+++ b/info/pcterm.c
@@ -831,7 +831,11 @@ rpl_nl_langinfo (nl_item item)
/* The rest of the code wants to see "UTF-8" and nothing else. */
if (console_cp == CP_UTF8)
- memcpy (buf, "UTF-8", sizeof "UTF-8");
+ {
+ memcpy (buf, "UTF-8", sizeof "UTF-8");
+ VARIABLE_ALIST *raw_utf8_var = variable_by_name ("raw-utf8-output");
+ set_variable_to_value (raw_utf8_var, "On", SET_BY_DEFAULT);
+ }
else if (console_cp == CP_UTF7)
sprintf (buf, "CP%u", console_cp);
else
The third argument to 'set_variable_to_value' is a priority level (the
lowest possible) which allows the user to override the value.