Skip to content

fix: truncate filenames by UTF-8 characters - #133

Open
yontani wants to merge 1 commit into
nextcloud:mainfrom
yontani:fix/utf8-filename-truncation
Open

fix: truncate filenames by UTF-8 characters#133
yontani wants to merge 1 commit into
nextcloud:mainfrom
yontani:fix/utf8-filename-truncation

Conversation

@yontani

@yontani yontani commented Aug 27, 2026

Copy link
Copy Markdown

Summary

  • Root cause: substr() truncates by bytes, which can split multibyte UTF-8 filenames.
  • Fix: use mb_substr($name, 0, 50, 'UTF-8') to truncate by UTF-8 characters.

Verification

  • Deterministic UTF-8 regression check: passed.
  • php -l lib/Service/FormService.php: passed.
  • git diff --check: passed.
  • Independent exact-SHA review: approved.

Production evidence

After deployment of this exact candidate, live create/read/delete with a long Korean title passed, and a real 46-question form was created and read successfully.

No secrets or credentials are included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant