aboutsummaryrefslogtreecommitdiffstats
path: root/src/version.c
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2023-04-04 10:11:15 +0000
committerIngo Klöcker <[email protected]>2023-04-04 10:11:15 +0000
commitd256ba7cc57d9bfcfa05fb05cf66dc992efbb695 (patch)
tree9676aba4fa8ba878fb1cfa08409acd65ec62b392 /src/version.c
parentcore: Minor code cleanup. (diff)
downloadgpgme-d256ba7cc57d9bfcfa05fb05cf66dc992efbb695.tar.gz
gpgme-d256ba7cc57d9bfcfa05fb05cf66dc992efbb695.zip
w32: Always use UTF-8 for localized texts
* configure.ac: Define GPG_ERR_ENABLE_GETTEXT_MACROS. * src/version.c (do_subsystem_inits) [W32]: Switch gettext to UTF-8. -- On Windows, applications using GpgME can now rely on localized texts returned by GpgME, e.g. the texts for error codes, to be UTF-8 encoded. In particular, this saves a useless and possibly lossy conversion to native encoding and back to UTF-8. On other OSes, where we use the system provided gettext, we assume that UTF-8 is used nowadays. GnuPG-bug-id: 5960
Diffstat (limited to 'src/version.c')
-rw-r--r--src/version.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/version.c b/src/version.c
index 5beb63a3..693a1e83 100644
--- a/src/version.c
+++ b/src/version.c
@@ -72,6 +72,9 @@ do_subsystem_inits (void)
WSAStartup (0x202, &wsadat);
}
+
+ /* We want gpgrt's gettext to always output UTF-8. */
+ gettext_use_utf8 (1);
#endif
_gpgme_debug_subsystem_init ();