From d256ba7cc57d9bfcfa05fb05cf66dc992efbb695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Tue, 4 Apr 2023 12:11:15 +0200 Subject: 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 --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0c15ab08..3ec1ea44 100644 --- a/configure.ac +++ b/configure.ac @@ -922,6 +922,9 @@ AH_BOTTOM([ # define GPGME_GCC_A_PURE #endif +/* Under Windows we use the gettext code from gpgrt. */ +#define GPG_ERR_ENABLE_GETTEXT_MACROS + /* Under WindowsCE we need gpg-error's strerror macro. */ #define GPG_ERR_ENABLE_ERRNO_MACROS 1 -- cgit v1.2.3