How does the syntax of the pine/alpine address book work with respect to unicode characters? Say that I want to include the entry
Nickname : søren
Fullname : sørensen
Fcc :
Comment :
Addresses : soren@sorensen.something
in my alpine address book. When I open then address book file, this entry coresponds to the line:
=?UTF-8?Q?s=C3=B8ren?= =?UTF-8?Q?s=C3=B8rensen?= soren@sorensen.something
I would like to know how this syntax for utf-8 characters work. My motivation for this question is the following: I would like to be able to (by search and replace) to produce a address book file where the real utf-8 characters appaer (since this is more readable), then eddit the file, and then translate back to pine/alpines syntax for utf-8 characters.
I already knew this much about the syntax:
This is directly quoted from the page: Alpine Technical Notes page on the official Alpine messaging sytems homepage. The part I did not know, and now have a pretty god guess at, was the part obout how it treatet utf-8 characters. It seems that for each of field
<nickname>,<fullname>,<address>,<fcc>, and<comments>, if the field contains some “certain” character as for example æ, ø, or å, then=?UTF-8?Q?is placed in the beginning of that field and?=in the end. Now, inbetween these two marks the contents of the field is placed, but with spaces replaced by_and with “certain” characters replaced by=XX=YYog=YYdepending on whether the characters UTF-8 Code is eitherXX YYor justYY. As an exampleøis replaced by=C3=B8, since the UTF-8 Code oføisC3 B8. Also,å,!, and;are replaced by=C3=A5,=21, and=3B, respectively, because their UTF-8 Codes areC3 A5,21, and3B, respectively.NOTE: I am not sure which characters makes Alpine implement the tags
=?UTF-8?Q?and?=, but I know that it is fewer characters than gets translated to their UTF-8 Code. For example, a field containingwould just be writen af
sorensen, soren, but a field containingwould be converted to
I am not entirely shure whether this is correct, but it seems like a pretty god guess as far as the address books I have looked.