henrycatalinismith / ppl

The command line address book
http://henry.catalinismith.com/ppl/
Other
300 stars 18 forks source link

Problem with saving from mutt with UTF-8 encoded contact name #49

Closed niklaas closed 9 years ago

niklaas commented 10 years ago

If I try to save a contact from mutt with a ›special character‹ in the name I get the following question

Add "=?utf-8?q?XX=C5=99XXXX=C3=A1?=<#<Ppl::Entity::EmailAddress:0x000000034d92e0>>" to your address book [Y/n]?

and as you can image the resulting filename is quite difficult to handle in the filesystem. (I used »X« to hide the name of the contact I am trying to save. In this case, the letter that is causing a problem is a »ř« which is used in Czech. Of course, it's a quite exotic letter but I had similar problems with a simple »é«.) Isn't it possible to replace special characters with a replacement character to ensure that there are no problems when saving the file?

(I'm sorry, I would like to do a push request but, unfortunately, my knowledge of Ruby is rather limited=not existent.)