Skip to content

DataTable: Wrong alphabetical sorting for Norwegian (and others?) #4623

Open
@rubjo

Description

@rubjo

Describe the bug

DataTable doesn't sort correctly with Nordic characters: "Å" is last in Norwegian, while DataTable sorts it immediately after "A".

localeCompare and Intl.Collator sort these correctly.

I suspect the same is the case for Danish, Swedish and possibly others.

How can I sort correctly by default – or how can I find documentation on how to do custom sorting?

Reproducer

https://stackblitz.com/edit/mczqps?file=src%2FApp.vue

PrimeVue version

3.36.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementIssue contains an enhancement related to a specific component. Additional functionality has been add

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions