From a8f945f511b5239bc9ad6535355e063cd050d414 Mon Sep 17 00:00:00 2001 From: Alex Muller Date: Thu, 10 Apr 2014 17:22:55 +0100 Subject: [PATCH] Remove ambiguous characters from tokens These are handled by humans, and occasionally humans use typefaces that do not distinguish between certain characters very well. This is the reason that I and Q are excluded from UK vehicle registration plates. Remove the characters zero, one, oh, eye and ell from tokens. Make them all lowercase, because there's no good reason not to. --- tools/generate-token.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/generate-token.sh b/tools/generate-token.sh index b0008bcf..0d92753c 100755 --- a/tools/generate-token.sh +++ b/tools/generate-token.sh @@ -7,6 +7,6 @@ # LC_CTYPE=C is specified for OS X, as otherwise tr will return # an illegal byte sequence from assuming /dev/urandom is UTF-8 -cat /dev/urandom | LC_CTYPE=C tr -cd 'a-zA-Z0-9' | head -c 64 +cat /dev/urandom | LC_CTYPE=C tr -cd 'a-z0-9' | tr -d '01oil' | head -c 64 echo '' # Add a newline