
ekleog at gmail
Jul 27, 2012, 11:53 AM
Post #1 of 4
(169 views)
Permalink
|
|
gpgme_set_locale on global context fails ?
|
|
Hello ! I'm learning GPGME, and just tried to use gpgme_set_locale. However, it looks like it doesn't work on the global context, only on a normal one. Here is what I mean : #include <gpgme.h> #include <locale.h> #include <stdio.h> int main() { setlocale(LC_ALL, ""); gpgme_ctx_t ctx; gpgme_new(&ctx); printf("%d\n", gpgme_set_locale(ctx, LC_ALL, setlocale(LC_ALL, NULL))); return 0; } It outputs 0, as expected. Now, the issue : #include <gpgme.h> #include <locale.h> #include <stdio.h> int main() { setlocale(LC_ALL, ""); printf("%d\n", gpgme_set_locale(NULL, LC_ALL, setlocale(LC_ALL, NULL))); return 0; } It outputs 117440567 ; that is "source: GPGME ; error: Invalid value". Do you have any idea of what it may have come from ? I have GPGME version 1.3.1, and GnuPG version 2.0.19, as distributed by archlinux. Thanks in advance, Ekleog _______________________________________________ Gnupg-devel mailing list Gnupg-devel [at] gnupg http://lists.gnupg.org/mailman/listinfo/gnupg-devel
|