nextcloud / nextcloud/mail

## 🐞 Bug: Mail search fails with diacritics in Safari (macOS) – "Could not open folder"

Open
#12,797 8 comments 0 reactions 1 assignee View on GitHub

@ChristophWurst is already working on this.

Since Apr 28, 2026.

0. to triage bug
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce
📦 Environment
  • Nextcloud version: 33
  • Mail app version: 5.7.12
  • Mail server: Dovecot (IMAP)
  • OS: macOS
  • Browser: Safari (latest version)
  • Works in: Edge (Windows) ✅
  • Fails in: Safari (macOS) ❌

🧩 Description

When using the search function in the Mail app with diacritics (non-ASCII characters), the search fails and displays the error:

"Could not open folder" (Složku nebylo možné otevřít)

The same search works correctly without diacritics and also works in other browsers (Edge on Windows).

Expected behavior
✅ Expected behavior

Search should work regardless of diacritics and return matching emails.

Actual behavior

❌ Actual behavior
  • Search with diacritics fails
  • UI shows misleading error: "Could not open folder"
  • No results returned
Mail app version

5.7.12

Nextcloud version

33.0.2

Mailserver or service

Dovecot

Operating system

OSX, safari, last actual version

PHP engine version

Other

Nextcloud memory caching

No response

Web server

Apache (supported)

Database

MariaDB

Additional info
🔍 Additional notes
  • This appears to be related to encoding / IMAP SEARCH handling

  • Possibly caused by:

    • incorrect UTF-8 handling
    • Unicode normalization differences (Safari vs Chromium)
    • improper escaping of IMAP search query
  • The error message is misleading — the issue is not related to folders


🌐 Browser-specific behavior
  • Safari (macOS): ❌ fails with diacritics
  • Edge (Windows): ✅ works correctly

This suggests a potential issue with how Safari encodes or sends the search query.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.