dev/core#2789 - Filename is not non-english-friendly in print/merge document #21259
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
https://lab.civicrm.org/dev/core/-/issues/2789
After #21006 the filename is now based on the activity subject, but this results in awkward filenames for non-english activity subjects.
Before
4hGbFjlOwHfeQx47ozW73rjd7qXWsDCm1BbViImz4fCo37Nu8577jElZKCx9swWWBnjEKX1sGMdMeaOKj6RjlRGZ9kBpgaAdME7LPEFWgV1tJQ01rhiYksubVULNej2OBxuaytIYl6WHe83wtEhb9tMTzmK7HkG0tcCDaqz69UI6rfJdlRZeKRkcU2xckpqNOuKtnXct.pdf
French and similar languages aren't too bad, but accented characters get replaced.
After
Alphabetic characters in all languages are retained. Emojis and punctuation etc are replaced.
Technical Details
munge() is useful if the filename isn't human-visible, or for generating valid db table names. If the filename needs to be human-sensible it's not a good choice.
Comments
Has test.