Unicode characters that can be used to bypass the string sorter?

Since Unicode is missing a series of zero-width sorting characters, I need to define equivalent characters that will allow me to force a specific list into a list that is automatically sorted by character values. Unfortunately, the list items are not in alphabetical order, and it is not permissible to prefix them with visible characters to ensure that the sort result matches the desired result.

What Unicode characters can be thrown out before regular Latin alphabetical text and do not appear, but still allow me to โ€œsplashโ€ the sorting as I need?

(BTW does this with Drupal 5 with a user profile list box. Donโ€™t worry, suggesting changing it to a dictionary / category.)

+3
source share
2 answers

A zero-width space (U + 200B) should probably do what you want. From the Unicode specification:

Space of zero width. U + 200B ZERO WIDTH SPACE indicates the possibility of line breaking, except that it does not have a width. Zero-width space characters are intended for use in languages โ€‹โ€‹that do not have a visible word spacing to represent line break options such as Thai, Khmer, and Japanese.

It should be in most fonts that you come across, but YMMV.

+4
source

/ . sql- (ORDER BY column_a, column_b). . Php usort(array, comparisonFunction) , , SQL .

, , , , , , . ( ).

Unicode , , / , , ( , , ). "" " " , . , , , , Unicode.

+1

Source: https://habr.com/ru/post/1697699/


All Articles