Skip to content

ORDER BY claues should respect system's locale settings or there should be an option to choose collate rules #130

Description

@kliberf

Currently, the ORDER BY clause uses (I assume) UTF8 byte order rules when sorting the data. It would be nice if it would respect locale settings (or if there was an option to choose so).

For example, the following file:

Ca
Ch
Co
Ča
Čch
Čo

sorted via csvq -n 'SELECT * FROM file ORDER BY c1', produces

+------+
|  c1  |
+------+
| Ca   |
| Ch   |
| Co   |
| Ča   |
| Čch  |
| Čo   |
+------+

while LC_ALL=cs_CZ.utf8 sort file, produces

Ca
Co
Ča
Čch
Čo
Ch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions