XF 2.0 Sorting characters

BassMan

Well-known member
In my language, we also have these characters: č, š and ž

The thread sorting is wrong, because it does not respect for example the Š character (which comes after the S), but instead, it sorts it like the Š character is actually the S character.

Example of threads sorting by Title ascending:
  • SAP
  • ŠAR
  • SIM
  • ŠIN
  • ŠTE
  • STO
  • ŠTR
  • ŠUR
  • SVO

As you can see it sorts it like they all starts with the S character.

It should be like that:
  • SAP
  • SIM
  • STO
  • SVO
  • ŠAR
  • ŠIN
  • ŠTE
  • ŠTR
  • ŠUR
 
This is about table/column collations and not something XF has any involvement with beyond setting it. We only support utf8(mb4)_general_ci out of the box. utf8(mb4)_unicode_ci may provide a better sort order, but it also has some other effects that may make it difficult to convert to it. For example, some user names (which have to be unique) may now be considered identical, which means you have to manually resolve them before converting. This may also apply to other tables.

In terms of support though, there isn't really a way to change this.
 
On the basis that this is the collation we use/support out of the box, yes. You could change it manually through your database, but you'd then need to manage this for all schema changes in the future (and deal with any potential index conflicts manually).
 
Top Bottom