Skip to content

SharePoint Online Search API sorts Swedish characters å, ä, ö together with a and o instead of after z #11039

Description

@Mattias-I

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Developer environment

None

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

SharePoint Online (Microsoft 365)
Site language: Swedish (1053)
Sorted property: Filename (sortable: yes)
Tried with and without Culture=1053 in the query

Describe the bug / error

When sorting search results alphabetically using the SharePoint Online Search REST API (/_api/search/query with sortlist), Swedish characters are not sorted according to Swedish collation rules. Instead of å, ä and ö being placed at the end of the alphabet (after z), they are sorted together with their base letters, so "å" and "ä" appear among "a", and "ö" appears among "o".

We noticed this behavior when using PnP modern search web part but we have tested this against the API.

Images below shows what it looks like from the search web part:

Image
Image

Question:

Is this expected behavior or a known limitation of the search index, where sorting is accent-insensitive and not culture-aware? If so, is there a supported way to get culture-specific sorting (Swedish) directly from the Search API, without having to sort client-side? If it is not intended behavior, could this be treated as a bug?

Steps to reproduce

  1. Create or use a list or library with items whose titles start with a, å, ä, o, ö and z.
  2. Query the Search API, for example:
    _api/search/query?querytext='ändra'&sortlist='Filename:ascending'&Culture=1053
  3. Observe that the order does not follow Swedish alphabetical rules.

Expected behavior

Results sorted in ascending order should follow Swedish collation: ... x, y, z, å, ä, ö.

Activity

  1. added
    type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
    on Sep 29, 2026
  2. m365-agent-toolkit-assistant commented on Sep 29, 2026

    @m365-agent-toolkit-assistant

    👋 Hi Mattias-I,

    Thank you for reporting this issue. Here is an AI-generated initial response:

    Classification: By design (provisional) — SharePoint documents SortList as sorting text by managed-property value using “standard text string sorting,” but does not promise Swedish collation or offer a collation selector.

    • You report the same order from /_api/search/query, with and without Culture=1053. That points away from the PnP web part, but does not establish how the search index handles accents.
    • Microsoft defines Culture as the query’s locale, not a sort-collation setting. The type:bug-suspected label is a triage signal, not confirmation of a defect.

    What to do now:

    1. For Swedish ordering, sort the complete result set client-side; sorting only one page would give incorrect pagination.
    2. If server-side sorting is essential, test a separately populated, sortable managed property containing Swedish-order sort keys. Ask Microsoft support to confirm whether native Swedish collation is supported.

    Useful links:


    Note: AI-generated guidance may be incomplete or incorrect. Please verify suggestions before applying them.

  3. Ashlesha-MSFT commented on Sep 30, 2026

    @Ashlesha-MSFT
    Contributor

    Hi, we were able to reproduce the issue.

    We created test files with names including anka, apa, bil, hund, ost, zebra, åland, äpple, and öl, and queried the SharePoint Search REST API using Filename:ascending with Swedish culture (Culture=1053).

    The results did not follow Swedish alphabetical sorting. Characters å, ä, and ö were grouped with their corresponding base characters instead of appearing after z as expected (... z, å, ä, ö).

    This appears to reproduce the reported behavior. We’ll raise a bug with the engineering team for further investigation and share an update when we have more information.

  4. added
    type:bug-confirmedConfirmed bug, not working as designed / expected.
    and removed
    type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
    on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions