Page MenuHome GnuPG

Name must be at least 5 characters long
Closed, ResolvedPublic

Description

Release: 1.4.1

Environment

MS-Windows XP, Linux

Description

I was trying to add a new UID on my local Windows XP.  It rejected my named saying that

Command> adduid
Real name: 依瑪貓
Name must be at least 5 characters long
Real name:

I can hardly believe it.  Common Chinese names consist of 2-4 characters, and Chinese are 1/4 of the total population of the human.  And common Japanese names consist of 3-5 characters.  Such a rule is amazingly unreasonable.

Fix

    • gnupg-1.4.1.orig/g10/keygen.c Fri Mar 11 21:56:06 2005 +++ gnupg-1.4.1/g10/keygen.c Wed May 25 14:16:03 2005 @@ -1659,8 +1659,8 @@ tty_printf(_("Invalid character in name\n")); else if( digitp(aname) ) tty_printf(_("Name may not start with a digit\n"));
  • else if( strlen(aname) < 5 )
  • tty_printf(_("Name must be at least 5 characters long\n")); + else if( strlen(aname) < 1 ) + tty_printf(_("Name must be at least 1 characters long\n")); else break; }

Event Timeline

I don't know how you entered your name but it is supposed to
be utf-8 encoded and thus for Chinese characters you should
have at least 2 or 3 times the number of characters. There
is something wrong with your system setup. We only count
the actula bytes and not the number of characters, so it
should be fine in general.

If there is a still a problem, you may use the option
--allow-freeform-uid.

From: imacat <imacat@mail.imacat.idv.tw>
To: bug-any@bugs.gnupg.org
Cc: gnupg-hackers@gnupg.org, gnats-admin@trithemius.gnupg.org, wk@gnupg.org
Subject: Re: gnupg/466
Date: Wed, 01 Jun 2005 00:12:34 +0800

--===[PGP/MIME_RFC2015]===429C8CEB.4B2F===
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

On Tue, 31 May 2005 09:01:17 +0200
wk@gnupg.org wrote:

I don't know how you entered your name but it is supposed to
be utf-8 encoded and thus for Chinese characters you should
have at least 2 or 3 times the number of characters. There
is something wrong with your system setup. We only count
the actula bytes and not the number of characters, so it
should be fine in general.

If there is a still a problem, you may use the option
--allow-freeform-uid.

Thank you for attending to this problem.

Well, if that is the case, then the problem might be Win32 specific.

It counts the characters, not the bytes, on GnuPG for Win32.

Best regards,
imacat ^_*' <imacat@mail.imacat.idv.tw>
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt

<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://www.linux.org.tw/mailman/listinfo/tlug

--===[PGP/MIME_RFC2015]===429C8CEB.4B2F===
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)

iEUEABECAAYFAkKcjOoACgkQi9gubzC5S1wW2QCfbJn44i4YtlxclMu+41iJTKfh
XGEAmPFFucm3iEMk51tiRhiUaJuGr3Q=

SV8N

-----END PGP SIGNATURE-----
--===[PGP/MIME_RFC2015]===429C8CEB.4B2F===--