3

GPG поддерживает Unicode, но я не могу заставить его работать

% gpg --utf8-strings --display-charset utf-8 --edit-key king@example.com
gpg (GnuPG) 1.4.15; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg: key xxxxxxxx: duplicated user ID detected - merged
Secret key is available.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
pub  4096R/xxxxxxxx  created: 2014-02-20  expires: never       usage: SC
                     trust: ultimate      validity: ultimate
sub  4096R/xxxxxxxx  created: 2014-02-20  expires: never       usage: E
[ultimate] (1). King George \xe2\xa3\x20<king@example.com>

gpg> uid

pub  4096R/xxxxxxxx  created: 2014-02-20  expires: never       usage: SC
                     trust: ultimate      validity: ultimate
sub  4096R/xxxxxxxx  created: 2014-02-20  expires: never       usage: E
[ultimate] (1). King George \xe2\xa3\x20<king@example.com>

gpg> adduid
Real name: King George Ⅳ      ### I type this.
Email address: king@example.com
Comment:
You are using the `utf-8' character set.
You selected this USER-ID:
    "King George � <king@example.com>"    ### Terminal notes corruption.

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O

You need a passphrase to unlock the secret key for
user: "King George \xe2\xa3\x20<king@example.com>"
4096-bit RSA key, ID xxxxxxxx, created 2014-02-20


pub  4096R/xxxxxxxx  created: 2014-02-20  expires: never       usage: SC
                     trust: ultimate      validity: ultimate
sub  4096R/xxxxxxxx  created: 2014-02-20  expires: never       usage: E
[ultimate] (1)  King George \xe2\xa3\x20<king@example.com>
[ultimate] (2). King George \xe2\xa3\x20<king@example.com>  ### That's not correct UTF-8.
  • Мой терминал настроен на использование UTF-8.
  • LANG=en_US.UTF-8

Обратите внимание на нижнюю часть: последовательность UTF-8 не верна, но она близка! Средний октет трехбайтовой последовательности, который должен быть там, отсутствует. Я сомневаюсь, что могу что-то сделать, чтобы средний октет упал, так что здесь происходит?

0