Skip to content

fix(http): avoid iconv for header ascii fallback - #60649

Merged
ChristophWurst merged 1 commit into
masterfrom
worktree-fix-content-disposition
May 26, 2026
Merged

fix(http): avoid iconv for header ascii fallback#60649
ChristophWurst merged 1 commit into
masterfrom
worktree-fix-content-disposition

Conversation

@ChristophWurst

@ChristophWurstChristophWurst commented May 21, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

iconv transliteration is locale- and config-dependent and fails silently on some setups. UnicodeString::ascii() from symfony/string uses a built-in transliteration table backed by symfony/polyfill-intl-normalizer, so it works on all setups without requiring optional PHP extensions.

#29470 removed iconv, I brought it back with #59843 🙈

TODO

  • Make the changes
  • Test the changes
    • Hard-coded filename "Täst" turns into content-disposition: attachment; filename=Tast; filename*=utf-8''T%C3%A4st -> ASCII fallback is Tast ✔️
  • Make sure it doesn't happen again: chore(psalm): forbid iconv #60655

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@Antreesy

Copy link
Copy Markdown
Contributor

removed iconv, I brought it back

Is it worth documenting somewhere for devs?

@ChristophWurst

Copy link
Copy Markdown
MemberAuthor

I think so, just don't yet know where to put it.

@ChristophWurst

Copy link
Copy Markdown
MemberAuthor

/backport to stable34

@ChristophWurst

Copy link
Copy Markdown
MemberAuthor

/backport to stable33

@ChristophWurst

Copy link
Copy Markdown
MemberAuthor

/backport to stable32

@ChristophWurstChristophWurst added this to the Nextcloud 35 milestone May 22, 2026
@ChristophWurst

Copy link
Copy Markdown
MemberAuthor

#60655 to prevent another re-introduction

@ChristophWurst
ChristophWurst marked this pull request as ready for review May 22, 2026 12:34
@ChristophWurst
ChristophWurst requested review from ArtificialOwl, come-nc, leftybournes and provokateurin and removed request for a teamMay 22, 2026 12:34
@ChristophWurstChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 22, 2026
@ChristophWurstChristophWurst mentioned this pull request May 22, 2026
10 tasks
iconv transliteration is locale- and config-dependent and fails silently
on some setups. UnicodeString::ascii() from symfony/string uses a built-in
transliteration table backed by symfony/polyfill-intl-normalizer, so it
works on all setups without requiring optional PHP extensions.
Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
@ChristophWurst
ChristophWurstforce-pushed the worktree-fix-content-disposition branch from 919077c to d1d24e6CompareMay 22, 2026 12:58
@ChristophWurstChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 22, 2026
@ChristophWurst

Copy link
Copy Markdown
MemberAuthor

CI failures unrelated

@ChristophWurst
ChristophWurst merged commit 29ebfa7 into masterMay 26, 2026
173 of 182 checks passed
@ChristophWurst
ChristophWurst deleted the worktree-fix-content-disposition branch May 26, 2026 07:22
@nextcloud-botnextcloud-bot mentioned this pull request Aug 11, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugregression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@ChristophWurst@Antreesy@ArtificialOwl@hamza221@SebastianKrupinski