I'd like to test some program on whether it can recognize Unicode chars and sort them correctly.
Can anybody provide some examples Unicode chars whose raw char representation will be sorted differently from the Unicode representation? Thanks.
I'd like to test some program on whether it can recognize Unicode chars and sort them correctly.
Can anybody provide some examples Unicode chars whose raw char representation will be sorted differently from the Unicode representation? Thanks.
>>> from pyuca import Collator
>>> sorted(["cafe", "caff", "café"])
['cafe', 'caff', 'café']
>>> sorted(["cafe", "caff", "café"], key=Collator().sort_key)
['cafe', 'café', 'caff']