locale bug in 1.4

David Tomaschik david at systemoverlord.com
Mon Mar 17 16:19:20 CET 2014


On Sun, Mar 16, 2014 at 9:28 PM, Hauke Laging <mailinglisten at hauke-laging.de
> wrote:

> Hello,
>
> I may have found a locale bug in 1.4.12. I am aware that this is not the
> current version but I cannot easily install 1.4.16 now. 1.4.12 is the
> version in Knoppix 7.2.
>
> I have problems with non-ASCII characters when I use batch mode. The
> funny part is that this problem does not appear when I generate a
> mainkey (from a batch config file). It appears when I add UIDs later:
>
> echo adduid$'\n'"$name"$'\n'"${email}"$'\n'"${comment}"$'\n'save$'\n' |
>   LC_ALL= LANGUAGE=en gpg --batch --passphrase foo \
>   --command-fd 0 --edit-key Hauke
>

Why are you setting LC_ALL= LANGUAGE=en?  This would cause the switch to
iso-8859-1 (well, to the system-wide default charset, but that's most like
iso-8859-1).


>
> The man page says about --display-charset:
> "If this option is not used, the default character set is determined
> from the current locale."
> What you would expect.
>
> locale looks like this:
>
> LANG=de_DE.UTF-8
> LANGUAGE=de
> LC_CTYPE="de_DE.UTF-8"
> LC_NUMERIC="de_DE.UTF-8"
> LC_TIME="de_DE.UTF-8"
> LC_COLLATE="de_DE.UTF-8"
> LC_MONETARY="de_DE.UTF-8"
> LC_MESSAGES="de_DE.UTF-8"
> LC_PAPER="de_DE.UTF-8"
> LC_NAME="de_DE.UTF-8"
> LC_ADDRESS="de_DE.UTF-8"
> LC_TELEPHONE="de_DE.UTF-8"
> LC_MEASUREMENT="de_DE.UTF-8"
> LC_IDENTIFICATION="de_DE.UTF-8"
> LC_ALL="de_DE.UTF-8"
>
> gpg --expert --gen-key
>
> leads to a message:
> "You are using the `utf-8` character set."
>
> The batch pipeline leads to:
> "You are using the `iso-8859-1` character set."
> Which IMHO pretty well explains the umlaut problems. But it doesn't make
> sense to me. Why does GnuPG guess it's not UTF-8 any more just because
> of the pipeline? Adding --display-charset utf-8 solves the problem. It
> does not occur with 2.0.22 (and some versions before).
>
>
> BTW: Unfortunately I have no clue about internationalization. Is it
> correct that LANG and all the LC_ variables have content of this kind
> LANG=de_DE.UTF-8 but that LANGUAGE has neither the _ part nor a
> character encoding?
>
>
> Hauke
> --
> Crypto für alle: http://www.openpgp-schulungen.de/fuer/unterstuetzer/
> http://userbase.kde.org/Concepts/OpenPGP_Help_Spread
> OpenPGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>
>


-- 
David Tomaschik
OpenPGP: 0x5DEA789B
http://systemoverlord.com
david at systemoverlord.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20140317/ba50927d/attachment.html>


More information about the Gnupg-users mailing list