Re: UUIDs



phil-news-nospam@xxxxxxxx wrote:
Anyone know why there are '-' characters in UUIDs at the particular positions
that they exist in? It seems the UUID is stored internally in resources like
filesystems without the '-' characters. Yet they serve no apparent value in
helping humans remember so many hexadecimal digits. Why even have them at
all? But really, why in the positions they are in?


From the document that defines UUIDs
(http://www.opengroup.org/onlinepubs/9629399/apdxa.htm#tagtcjh_34)

String Representation of UUIDs

For use in human readable text, a UUID string representation is specified as
a sequence of fields, some of which are separated by single dashes.

Each field is treated as an integer and has its value printed as a
zero-filled hexadecimal digit string with the most significant digit first.
The hexadecimal values a to f inclusive are output as lower case characters,
and are case insensitive on input. The sequence is the same as the UUID
constructed type.


The formal definition of the UUID string representation is provided by the
following extended BNF:

UUID = <time_low> <hyphen> <time_mid> <hyphen>
<time_high_and_version> <hyphen>
<clock_seq_and_reserved>
<clock_seq_low> <hyphen> <node>


HTH
--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------

.



Relevant Pages

  • Re: UUIDs
    ... It seems the UUID is stored internally in resources like ... |> filesystems without the '-' characters. ... |> helping humans remember so many hexadecimal digits. ... | For use in human readable text, a UUID string representation is specified as ...
    (comp.os.linux.development.system)
  • Re: Generate UUID that fits on 37 digits [0-9]
    ... I need to generate uuid that will fits ... Allow more characters per position. ... According to RFC 4122, UUIDs should be given in hex digits anyway, see ...
    (comp.programming)