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

Line Break within NoteField not working for long Strings #9

Closed
GoogleCodeExporter opened this issue Mar 21, 2015 · 7 comments
Closed

Comments

@GoogleCodeExporter
Copy link

This problem occurs when adding pretty long String to the Notefild and 
importing the vcard into Outlook (I´m using Outlook 2010)

To reproduce the problem:

        VCard vcard = new VCard();
        vcard.addNote(new NoteType("twitter: www.twitter.com/NameName\nlinkedIn: www.linkedin.com/inNameName\nxing: www.xing.com"));

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


Expected Output
When opening the *.vcf file in Outlook, I expect 

twitter:
www.twitter.com/NameName
LinkedIn:
www.linkedin.com/in/NameName
xing:
www.xing.com/profile/NameName

Actual Output:
But what I actual got is:

twitter:
www.twitter.com/NameName
Linked

And that is it. Because within the *.vcf file is a line break after a specific 
number of characters, and everything in the new line isn´t showing in 
Outlook´s Notefield. 
This is really bugging me, because I have pretty long links to put into the 
notefield.
If I don´t use \n for example and write everything inline, there is always a 
space when there is a break in the *.vcf file. And within a link this is a real 
problem, because it should be clickable.  

I attached a screenshot that hopefully makes this more clear. 

EzVcard Version: 0.8.4
Java Version: 1.7


Thank you!

Original issue reported on code.google.com by JulianeD...@gmail.com on 24 Sep 2013 at 10:16

Attachments:

@GoogleCodeExporter
Copy link
Author

It looks like this is a bug in the way that ez-vcard handles "quoted-printable" 
values on multiple lines.  There should be a "=" character at the end of each 
folded line.  Would you mind loading the attached vCard file in Outlook and 
letting me know if it works?

As a work around, you can force ez-vcard to put all properties on a single 
line.  This should cause Outlook to correctly display the NOTE property.

new VCardWriter(writer, VCardVersion.V2_1, null, "\r\n").write(vcard);

Thanks,
Mike

Original comment by mike.angstadt on 24 Sep 2013 at 12:55

  • Changed state: Accepted

Attachments:

@GoogleCodeExporter
Copy link
Author

Hey,

the attached vCard is displayed correctly in Outlook (I attached a screenshot) 
This is the actual output I desire. 

I just tested the work around you explained and to put it all on a single line 
it works well too. 

Though, I´d like the other solutions (the one with line breaks) better. :)

Thank you very much for the quick response! 

Original comment by JulianeD...@gmail.com on 24 Sep 2013 at 2:00

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

The bug should be fixed now.  Attached is a snapshot JAR if you want to test it 
out.  I'll probably release a stable version within a few days.  Thanks for 
reporting this!

Original comment by mike.angstadt on 25 Sep 2013 at 12:32

Attachments:

@GoogleCodeExporter
Copy link
Author

Thank you very much for fixing this and the quick support! 


Original comment by JulianeD...@gmail.com on 30 Sep 2013 at 8:06

@GoogleCodeExporter
Copy link
Author

No problem!  I've just deployed a stable version.  It should be available on 
Maven within a few hours.

Original comment by mike.angstadt on 1 Oct 2013 at 5:31

@GoogleCodeExporter
Copy link
Author

Yes, awesome! Thanks :)

Original comment by JulianeD...@gmail.com on 2 Oct 2013 at 8:14

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