297df938d615607d41f42068d39923cc64e9d292
Improve the function ``cleanup_filename()`` of ``lib/mu-msg-part.c`` to use Unicode characters when replacing the control characters, slashes and colons with ``-``. Originally, this function just use plain C characters (i.e., assuming ASCII string) when checking each character is or not a control character, slash or colon. However, when the attachment filename contains non-ASCII (e.g., Chinese characters), all the non-ASCII characters are replaced with ``-``. For example: * Before: ``` > mu view test_chinese_attachment_filename.eml From: Tester <tester@example.com> To: Example <example@example.com> Subject: Test email with attachment of Chinese filename Date: Mon 23 May 2016 05:22:09 PM CST Attachments: 'attachment-test.txt', '------------.txt', '-------test.txt' Hello, This is a simple test email with three attachments: 1. `attachment:test.txt`: filename is all English; 2. `测试附件.txt`: filename is all Chinese (exclude the extension); 3. `附件-test.txt`: filename mixes Chinese and English. ``` * After: ``` > ./build/mu/mu/mu view test_chinese_attachment_filename.eml From: Tester <tester@example.com> To: Example <example@example.com> Subject: Test email with attachment of Chinese filename Date: Mon 23 May 2016 05:22:09 PM CST Attachments: 'attachment-test.txt', '测试附件.txt', '附件-test.txt' Hello, This is a simple test email with three attachments: 1. `attachment:test.txt`: filename is all English; 2. `测试附件.txt`: filename is all Chinese (exclude the extension); 3. `附件-test.txt`: filename mixes Chinese and English. ```
README
======
Welcome to mu!
---------------
Given the enormous amounts of e-mail many people gather and the importance of
e-mail message in our work-flows, it's essential to quickly deal with all that
mail - in particular, to instantly find that one important e-mail you need right
now.
[mu] is a tool for dealing with e-mail messages stored in the
Maildir-format. =mu='s purpose in life is to help you to quickly find the
messages you need; in addition, it allows you to view messages, extract
attachments, create new maildirs, and so on. See the [mu cheatsheet] for some
examples. =mu= is fully documented.
After indexing your messages into a [Xapian]-database, you can search them using
a custom query language. You can use various message fields or words in the
body text to find the right messages.
Built on top of the mu, are some extensions (included in this package):
- mu-for-emacs ([mu4e]): a full-featured e-mail client that runs inside emacs
- [mu-guile]: bindings for the Guile/Scheme programming language (version 2.0
and later)
- a toy GTK+-interface called 'mug' (in the 'toys/' subdir)
=mu= is written in C and a bit of C++ (to interface with Xapian), with =mu4e=
written in [Emacs-Lisp] and =mu-guile= in a mix of C and Scheme.
Note, =mu= is available in Debian/Ubuntu under the name =maildir-utils=;
apparently because they don't like short name. It's also possible to confuse
that name with the [GNU Mailutils] project (which is totally unrelated) - but
now you have been warned.
[mu]: http://www.djcbsoftware.nl/code/mu
[mu cheatsheet]: http://www.djcbsoftware.nl/code/mu/cheatsheet.html
[Xapian]: http://www.xapian.org
[mu4e]: http://www.djcbsoftware.nl/code/mu/mu4e.html
[mu-guile]: http://www.djcbsoftware.nl/code/mu/mu-guile.html
[Emacs-Lisp]: http://en.wikipedia.org/wiki/Emacs-Lisp
[GNU Mailutils]: http://mailutils.org/
Description
Languages
C++
61.5%
Emacs Lisp
29.1%
Scheme
5%
Meson
3.1%
Shell
0.3%
Other
1%