Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#2789 - Filename is not non-english-friendly in print/merge document #21259

Merged
merged 1 commit into from
Aug 27, 2021

Conversation

demeritcowboy
Copy link
Contributor

@demeritcowboy demeritcowboy commented Aug 26, 2021

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

  1. Search for contacts.
  2. Choose print/merge document from the actions menu.
  3. Fill out a non-english subject, e.g. ДДДДДД
  4. When you download the filename is something like

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.

@civibot
Copy link

civibot bot commented Aug 26, 2021

(Standard links)

@civibot civibot bot added the master label Aug 26, 2021
@eileenmcnaughton
Copy link
Contributor

thanks @demeritcowboy

@eileenmcnaughton eileenmcnaughton merged commit 9cf2045 into civicrm:master Aug 27, 2021
@demeritcowboy demeritcowboy deleted the better-file branch August 27, 2021 02:29
@demeritcowboy
Copy link
Contributor Author

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants