Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line properties are written incorrectly for VCard 2.1 #3

Closed
GoogleCodeExporter opened this issue Mar 21, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link

VCard 2.1 specification section 2 (Delimiters) says:

""""
A formatted text line break in a property value, must also be represented by a 
(RFC 822) line break, which is a CRLF sequence. However, since the CRLF 
sequence is used to delimit a line, property values with formatted line breaks 
(i.e., multiple lines) must be encoded using an alternate encoding of either 
Quoted-Printable or Base64, as defined in RFC 1521.
""""

To reproduce the problem:

        VCard vcard = new VCard();
        vcard.addNote(new NoteType("Line one\r\nLine two"));

        StringWriter writer = new StringWriter();
        new VCardWriter(writer, VCardVersion.V2_1).write(vcard);
        System.out.println(writer);


Actual output is:

BEGIN:VCARD
VERSION:2.1
NOTE:Line one\nLine two
X-PRODID:ez-vcard 0.6.0
END:VCARD


Expected output is:

BEGIN:VCARD
VERSION:2.1
NOTE;ENCODING=QUOTED-PRINTABLE:Line one=0D=0ALine two
X-PRODID:ez-vcard 0.6.0
END:VCARD

Original issue reported on code.google.com by dna...@gmail.com on 2 Jan 2013 at 8:48

@GoogleCodeExporter
Copy link
Author

Fixed in r339, thanks.

Original comment by mike.angstadt on 3 Jan 2013 at 2:52

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant