[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnupg-users
Subject:    Re: Unicode and --with-colons
From:       Ben McGinnes <ben () adversary ! org>
Date:       2017-05-27 9:56:09
Message-ID: 20170527095609.ob5foolkqcrwtllq () adversary ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


On Sat, Apr 01, 2017 at 04:57:04AM -0400, Robert J. Hansen wrote:
> C:\Users\Robert J. Hansen\Desktop> gpg --fixed-list-mode --with-colons
> --list-key 0x3ADBFA6D00A1E6FE
> 
> =====
> [... trimmed ...]
> uid:-::::1436536488::100E4A12486A5261E374B3B0CA16CF0516F4367C::Ludwig
> Hügelschäfer <ludwig@hammernoch.net>:
> =====
> 
> "That's an odd encoding," I said to myself.  "It must be UTF-8 presented
> as ASCII or Windows-1252.  Let's look, shall we?"

I've never noticed anything like that with Ludwig's key.

Either regularly or with the flags you used here.  That said, if you
ever do need to be absolutely certain that the output is in UTF-8,
there is a way to guarantee it.  Just use GPGME's little known or
noticed XML output with gpgme-tool:

echo "KEYLIST 0x3ADBFA6D00A1E6FE /bye" | gpgme-tool > 0x3ADBFA6D00A1E6FE.xml

The output will need to be trimmed of the GPGME header at the top, the
"OK" disconnection at the bottom, the "D " at the beginning of each
line and the "%0A" at the end of each line.  I'm sure you can script
it to trim all that for you before writing the file anyway.  Although
I've attached that example here.

On a semi-related note; a bit over a year ago I generated W3C XML
Schema (XSD) and Relax-NG Schema (RNG) files for the GPGME XML data.
From these I also generated Relax-NG Compact (RNC), DTDs, Docbook 5
documentation (from the XSD) and XHTML docs (from the Docbook); in
case anyone finds a need for validating the XML files.  There isn't
currently a formal XML namespace setup for the schemas since it
doesn't appear that anyone's done anything with it (i.e. no one
noticed and thus no one asked for it).

Anyway, if they're of use, the schemas and docs are in one of my
branches on the git server, here:

https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=tree;f=lang/xml-schemas;h=06dfd4c925294cffba88f4f451bdef39dd2b4e4d;hb=6e9d5a5800fa8da96c706748bf60a8a074818af6


I'd recommend using either the XSD or the RNG rather than the others.
They're generally going to be better or more accurate.  The RNC and
DTD are there because I figured I may as well generate them at the
same time.


Regards,
Ben


["0x3ADBFA6D00A1E6FE.xml" (application/xml)]
["signature.asc" (application/pgp-signature)]

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic