Comparing Raw Values of the Age Property
Asmus Freytag via Unicode
unicode at unicode.org
Tue May 23 01:43:42 CDT 2017
On 5/22/2017 3:49 PM, Richard Wordingham via Unicode wrote:
> One of the objectives is to use a current version of the UCD to
> determine, for example, which characters were in Version x.y. One
> needs that for a regular expression such as [:Age=3.0:], which
> also matches all characters that have survived since Version 1.1.
> Another is to record for which versions of the standard a character had
> some particular value of a property.
I would tend to side with those who claim that "version number" is
something that's defined by common industry practice, and therefore not
something that Unicode needs to define - but is allowed to use. Just
like Unicode doesn't define what an integer is, or hexadecimal number
system or a whole host of other concepts that are used in defining in
turn what Unicode is.
As Markus implied, version numbers are a positional number system where
the positions in turn are integers in decimal notation, separated by dots.
As it is neither a "string" nor a single number, neither of those common
sorting methods give the right answer, but a multi-field sort will.
If you have a multi-field sort algorithm that uses commas as the
delimiter, just swap out the dots for commas. If not, then you have to
implement your own multi-level sort.
In any well-designed modern runtime library you can pass a comparison
method to any of the sorting algorithms (or sorted data collections).
PS: somewhere in the standard, Unicode does define names for the fields:
Major, Minor and Update. The use of the term "Update" may not be
universal, but major and minor version numbers are a well established
concept and do not need a definition. The naming also implies the order
More information about the Unicode