gnupg: with-colons option breaks encoding
wk at gnupg.org
Fri Jun 13 18:16:22 CEST 2008
On Fri, 13 Jun 2008 14:26, petr.uzel at suse.cz said:
> I suggest to fix this by using 'print_utf8_string2()' instead of simple 'print_string()' in 'list_keyblock_colon()'. (Hope this description is not considered a patch ;) )
The options --with-colons is supposed to print utf-8 which is the native
format of OpenPGP. Thus print_string is correct. print_utf8_string
would convert it first to the native encoding which is wrong.
What you see is C-style quoting:
10. Field: User-ID. The value is quoted like a C string to avoid
control characters (the colon is quoted "\x3a").
This is not used with --fixed-list-mode in gpg.
Note that the last sentence is plainly wrong. I don't know why it was
The quoting is also done for the Latin-1 high control characters (*p >=
0x7f && *p < 0xa0), thus you see only parts of an utf-8 character
quoted. The dequoting has to be done anyway thus I do not care to much
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.
More information about the Gnupg-devel