evert/sabre-vobject — pull request #31 by clue (2013-04-30 16:04:56+00:00)
Title: Extended OOP Reader (quoted-printable encoding / MS outlook, line folding, error reporting, plus more )

Thanks for this great library! Unfortunately though, we've had some major issues with reading quoted-printable vcards as commonly encountered (MS Outlook, some Android phones, etc.).

This PR fundamentally extends the `Reader` by using a more parser-like approach by operating on a string buffer instead of (less reliable) line-based parsed using regular expressions.

* Extendable, re-usable OOP design
* Supports reading quoted-printable encoding as defined[1] for VCard 2.1 and as commonly *interpreted* by MS Outlook and others
* Property-Parameter-Values can now include backslash-escaped semicolons as defined[1]
* Improved Error reporting with *real* line number, line contents and even a marker in the line *where* parsing fails
* Current unit tests pass unchanged (fully backwards-compatible)
* Plus additional unit tests

[1] See [vCard: The Electronic Business Card (Version 2.1) vCard 2.1 specification (Sept-18-1996)](http://www.imc.org/pdi/vcard-21.doc). Unfortunately its definition conflicts with unfolding (as it was previously done) and as such MS Outlook and others do not *quite* adhere to the standard. Also, backslash-escaped values (such as `\n`) should not be interpreted if an encoding is set. Of course, [other libraries](http://sourceforge.net/apps/mediawiki/cardme/index.php?title=A_Note_About_Compatibility_Modes) and [programs](https://bugzilla.mozilla.org/show_bug.cgi?id=589332) have faced (or are *still* facing) the same problems.

Any feedback is appreciated! Let us know what you think about it.