Sorting of Unicode vulgar fractions

40 views
Skip to first unread message

Ross Olson

unread,
Mar 25, 2025, 6:01:18 PMMar 25
to BBEdit Talk
I'm not sure if this is an intentional result, but there is a situation where the 'Sort lines' : 'Numbers match by value' is not living up to it's billing. I'm working on a Project Gutenberg conversion of a mathematics text, and I'm working on a base Unicode version that will be used to generate the 7-bit ASCII version at a later date.

However in the mean time, I'm trying to use the full range of Unicode characters, including the vulgar fractions <https://en.wikipedia.org/wiki/Number_Forms>. When trying to create a list of the fractions for myself to easily search and replace my raw text, I tried sorting the fractions using the above 'Numbers match by value' and it came back as:



½

¼







¾







The list starts off well with the 0/3 at the top (useful for the baseball statisticians among us). The list's end is good too, with the nearly-an-integer 7/8. However, the keen-eyed among you will note that the value of 1/2 is listed ahead of the relatively smaller 1/3.

Having described the situation, and presented the expected value and the error value, I present my annotated expected return value:

↉     0⁄3 (0)
⅒     1⁄10 (0.1)
⅑     1⁄9 (0.111...)
⅛     1⁄8 (0.125)
⅐     1⁄7 (0.142...)
⅙     1⁄6 (0.166...)
⅕     1⁄5 (0.2)
⅓     1⁄3 (0.333...)
⅜     3⁄8 (0.375)
⅖     2⁄5 (0.4)
½     1⁄2 (0.5)
⅗     3⁄5 (0.6)
⅝     5⁄8 (0.625)
⅔     2⁄3 (0.666...)
⅘     4⁄5 (0.8)
⅚     5⁄6 (0.833...)
⅞     7⁄8 (0.875)

If this is a reasonable bug report, please let me know. If, as my family like to accuse me, this is too pedantic for general consumption, feel free to ignore this.

...Ross...
(BBEdit user since, let's say, about 1996.)

Rich Siegel

unread,
Mar 25, 2025, 6:02:59 PMMar 25
to BBEdit Talk
On 25 Mar 2025, at 18:00, Ross Olson wrote:

> I'm not sure if this is an intentional result, but there is a situation
> where the 'Sort lines' : 'Numbers match by value' is not living up to it's
> billing. I'm working on a Project Gutenberg conversion of a mathematics
> text, and I'm working on a base Unicode version that will be used to
> generate the 7-bit ASCII version at a later date.
>
> However in the mean time, I'm trying to use the full range of Unicode
> characters, including the vulgar fractions
> <https://en.wikipedia.org/wiki/Number_Forms> . When trying to create a list
> of the fractions for myself to easily search and replace my raw text, I
> tried sorting the fractions using the above 'Numbers match by value' and it
> came back as:
> [...]

"Sort numbers by value" assumes that the input is actually numeric, which, pedantry aside, Unicode vulgar fraction glyphs are not. :-)

R.

--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <https://www.barebones.com/>

Someday I'll look back on all this and laugh... until they sedate me.

Ross Olson

unread,
Mar 26, 2025, 8:51:51 PMMar 26
to BBEdit Talk
On Tuesday, March 25, 2025 at 3:02:59 PM UTC-7 Rich Siegel wrote:

> "Sort numbers by value" assumes that the input is actually numeric, which,
> pedantry aside, Unicode vulgar fraction glyphs are not. :-)

Sigh. So BBEdit will continue to discriminate against my vulgar fractions by not discriminating my denominators?

Damn.

The fall of western civilization continues. I, still, will soldier on.

...Ross...

Reply all
Reply to author
Forward
0 new messages