Jeff Davis <pg...@j-davis.com> writes: > On Sun, 2023-03-05 at 08:27 +1300, Thomas Munro wrote: >> It's created for UTF-8 only, and UTF-8 sorts the same way as the >> encoded code points, when interpreted as a sequence of unsigned char >> by memcmp(), strcmp() etc. Seems right?
> Right, makes sense. > Though in principle, shouldn't someone using another encoding also be > able to use ucs_basic? I'm not sure if that's a practical problem or > not; I'm just curious. Does ICU provide a locale for sorting by code > point? ISTM we could trivially allow it in LATIN1 encoding as well; strcmp would still have the effect of sorting by unicode code points. Given the complete lack of field demand for making it work in other encodings, I'm unexcited about spending more effort than that. regards, tom lane