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
Copy link
Copy Markdown
Member

@ChristophWurst ChristophWurst commented May 21, 2026

  • 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
Member Author

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

@ChristophWurst
Copy link
Copy Markdown
Member Author

/backport to stable34

@ChristophWurst
Copy link
Copy Markdown
Member Author

/backport to stable33

@ChristophWurst
Copy link
Copy Markdown
Member Author

/backport to stable32

@ChristophWurst ChristophWurst added this to the Nextcloud 35 milestone May 22, 2026
@ChristophWurst
Copy link
Copy Markdown
Member Author

#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 team May 22, 2026 12:34
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 22, 2026
@ChristophWurst ChristophWurst 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 ChristophWurst force-pushed the worktree-fix-content-disposition branch from 919077c to d1d24e6 Compare May 22, 2026 12:58
@ChristophWurst ChristophWurst 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
Member Author

CI failures unrelated

@ChristophWurst ChristophWurst merged commit 29ebfa7 into master May 26, 2026
173 of 182 checks passed
@ChristophWurst ChristophWurst deleted the worktree-fix-content-disposition branch May 26, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants