This is it. It needs proofreading, and suggestions about what's good and bad. It's not complete either. This paper will concentrate on the latter category.
Some characters are special.
CR LF A NUL is never sent over to the server. Therefor a quote character is needed. Of course, the quote character itself has to be quoted too. To send extended data inside the text, we need some way to delimit it. This is done by starting and ending extended data with a delimiter character.