> Date: Thu, 15 Jan 2026 13:49:09 +0100 > From: Patrice Dumas <[email protected]> > Cc: [email protected], [email protected] > > This code seems somewhat similar to code in texi2any.c that is used to > determine the locale, which, I believe you proposed. It is not exactly > the same context, I do not think that we want the translit part, but the > UTF-8 part could be relevant. Just before that code, if > HAVE_LANGINFO_CODESET is defined, nl_langinfo (CODESET) is used. > Now that I look at the code more closely, it could be different as > the function used is diferent, GetACP versus GetConsoleOutputCP. > The code is currently: > > #ifdef _WIN32 > if (!locale_encoding) > { > unsigned cp = GetACP (); > xasprintf (&locale_encoding, "cp%u", cp); > } > #endif > > Should there be a change to that code too?
I think texi2any uses the locale's encoding for different purposes, but it cannot do any harm to report codepage 65001 as "UTF-8", so yes. (The //TRANSLIT part is only useful if libiconv is used to convert between two encodings, and if there's a chance some characters cannot be encoded in the target encoding.)
