From 32b364b99b492c580330591640cdaa7407016733 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 7 Feb 2022 17:22:19 +0100 Subject: [PATCH] gpgconf: Print the used code pages on Windows with --show-configs * tools/gpgconf.c (show_configs): Add some code --- tools/gpgconf.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/gpgconf.c b/tools/gpgconf.c index 45c23edbb..0783b4370 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -1381,6 +1381,15 @@ show_configs (estream_t outfp) show_version_gnupg (outfp, "### "); es_fprintf (outfp, "### Libgcrypt %s\n", gcry_check_version (NULL)); es_fprintf (outfp, "### GpgRT %s\n", gpg_error_check_version (NULL)); +#ifdef HAVE_W32_SYSTEM + es_fprintf (outfp, "### Codepages:"); + if (GetConsoleCP () != GetConsoleOutputCP ()) + es_fprintf (outfp, " %u/%u", GetConsoleCP (), GetConsoleOutputCP ()); + else + es_fprintf (outfp, " %u", GetConsoleCP ()); + es_fprintf (outfp, " %u", GetACP ()); + es_fprintf (outfp, " %u\n", GetOEMCP ()); +#endif es_fprintf (outfp, "###\n\n"); list_dirs (outfp, NULL, 1);