[GnuPG] gpgme_set_locale on global context fails ?

Leo Gaspard ekleog at gmail.com
Fri Jul 27 23:43:39 CEST 2012

On 27/07/2012 22:40, W. Trevor King wrote:
> On Fri, Jul 27, 2012 at 08:53:18PM +0200, Leo Gaspard wrote:
>> 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.
> That would be because the definition is currently:
>    [...]
> But it looks like gpgme_set_locale actually does handle the !ctx case
> well.

Just tried, and it looks like global context's locale is set only through setlocale.
Then, why does the documentation 
(http://www.gnupg.org/documentation/manuals/gpgme/Locale.html#Locale) states 
that "The function gpgme_set_locale sets the locale of the context ctx, /or the 
default locale if ctx is a null pointer/." ?

Should I still call gpgme_set_locale(NULL, ...) and ignore its result for 
upwards compatibility ?

Thanks !

Leo Gaspard

More information about the Gnupg-devel mailing list