[GH-ISSUE #7309] [Bug] String sorting not adhering to Unicode recommendations #3248

Closed
opened 2026-03-23 21:28:41 +00:00 by mirror · 1 comment
Owner

Originally created by @Justin-Maxwell on GitHub (Feb 2, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/7309

Bug Description

Unicode provides the specification of how Unicode strings short ideally be sorted.

See https://unicode-org.github.io/icu/userguide/collation/

There are implementations of the standard available, such as https://github.com/theodore-s-beers/feruca

It is jarring when the use of alphabetic forms or numerals, such as superscripts or subscripts, or accented letters, produces unexpected and random string sorting behaviour.

How to Reproduce

  1. Create an empty DB Grid.
  2. Create three entries with the following superscript numerals as their name properties
  • ¹
  • ²
  • ³
  1. Sort the grid by the name property (ascending)

Expected Behavior

The three entries should be in natural ascending numerical order. (i.e. ¹,²,³)

Operating System

Win 11

AppFlowy Version(s)

0.8.2

Screenshots

After sorting by name:

Image

Additional Context

This numeric superscript might seem a contrived example, but not following the Unicode collation standards can cause all sorts of problems with e.g. peoples names not being in the expected place on alphabetic lists etc because accented characters that are not within the locale or raw code-point sort order put them in a location that depends more than anything on when the glyph was added to the unicode standard. These superscript digits are useful because they can sometimes detect when some sort of manual bodge has been implemented to deal with a specific local language issue, rather than just plugging in a maintained and conformant library.

Image

Just for the overly intrigued, some codepoints:

  • ⁰ U+2070
  • ¹ U+00B9
  • ² U+00B2
  • ³ U+00B3
  • ⁴ U+2074
  • ⁹ U+2079
Originally created by @Justin-Maxwell on GitHub (Feb 2, 2025). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/7309 ### Bug Description Unicode provides the specification of how Unicode strings short ideally be sorted. See https://unicode-org.github.io/icu/userguide/collation/ There are implementations of the standard available, such as https://github.com/theodore-s-beers/feruca It is jarring when the use of alphabetic forms or numerals, such as superscripts or subscripts, or accented letters, produces unexpected and random string sorting behaviour. ### How to Reproduce 1. Create an empty DB Grid. 2. Create three entries with the following superscript numerals as their name properties - ¹ - ² - ³ 3. Sort the grid by the name property (ascending) ### Expected Behavior The three entries should be in natural ascending numerical order. (i.e. ¹,²,³) ### Operating System Win 11 ### AppFlowy Version(s) 0.8.2 ### Screenshots After sorting by name: ![Image](https://github.com/user-attachments/assets/6106413a-011c-423a-905e-bdbd114b9e91) ### Additional Context This numeric superscript might seem a contrived example, but not following the Unicode collation standards can cause all sorts of problems with e.g. peoples names not being in the expected place on alphabetic lists etc because accented characters that are not within the locale or raw code-point sort order put them in a location that depends more than anything on when the glyph was added to the unicode standard. These superscript digits are useful because they can sometimes detect when some sort of manual bodge has been implemented to deal with a specific local language issue, rather than just plugging in a maintained and conformant library. ![Image](https://github.com/user-attachments/assets/5869aaf9-ae88-4eb5-bcd1-65822751ee78) Just for the overly intrigued, some codepoints: - ⁰ U+2070 - ¹ U+00B9 - ² U+00B2 - ³ U+00B3 - ⁴ U+2074 - … - ⁹ U+2079
Author
Owner

@appflowy commented on GitHub (Dec 9, 2025):

This issue has already been fixed and will be included in the upcoming release (0.10.7). I’m closing this issue.

<!-- gh-comment-id:3631898349 --> @appflowy commented on GitHub (Dec 9, 2025): This issue has already been fixed and will be included in the upcoming release (0.10.7). I’m closing this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#3248
No description provided.