In article <email@example.com>, firstname.lastname@example.org
> I've just encountered an annoying hassle where proper handling of
> archival bibliographic data requires keeping track of leading zeros in
> ID numbers; and these seem like informed groups to ask if anyone has
> comments or observations on other electronic or online systems that
> require or even allow leading zeros?
> Specifically the Am Phys Soc now identifies articles not by volume and
> page numbers but by volume and a six-digit "article number" which
> sometimes does and sometimes does not have an initial zero -- but if
> it does you _must_ keep it for various bibliographic and online
> citations to work properly. A few quick tests show that the default
> behavior is to automatically and irretrievably discard leading zeros
> on integer numbers keyed into an Excel worksheet cell or a Mathematic
> list. One of my bank accounts prints my account number with three
> leading zeros, but won't accept them in the Account Number field for
> online login. On the other hand for another ID card I have, you
> _must_ type the leading zeros.
> Are there any kind of published refs or computer standards or human
> interface guidelines on the use of leading zeros? ZIP codes use 'em,
> phone numbers don't?
The application typically must be set up to handle the ID numbers as
character strings. In the case of excel spreadsheets, when entering
the ID numbers directly, put a single quote before the entry (e.g.,
'00123) to treat it as a string. It should be possible to devise data
entry dialogs that handle this correctly without having to put in the
Early in the days of the WWW, some online forms made the mistake of
treating entries beginning with 0 as octal, resulting in the rejection
of entries with digits greater than 7 and the translation of others to
completely unintended values (e.g., 050 would be 50 base 8, or 40 base
10). Any database program should have a simple way to deal with this.
For example, input the data as a character string, validate the
characters as permissible, such as 0-9, require reentry if not valid,
and then translate to whatever format is used internally.
Michael D. Sullivan
Bethesda, MD, USA
Replace "example.invalid" with ".com".