srikanthtalasila / ez-vcard

Automatically exported from code.google.com/p/ez-vcard
0 stars 0 forks source link

Line Break within NoteField not working for long Strings #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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

Attachments:

GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
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 commented 9 years ago
Yes, awesome! Thanks :)

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