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

Folded line causing cut-off cities in certain vcards #95

Closed
JoelLisenby opened this issue Jun 9, 2017 · 5 comments
Closed

Folded line causing cut-off cities in certain vcards #95

JoelLisenby opened this issue Jun 9, 2017 · 5 comments

Comments

@JoelLisenby
Copy link

JoelLisenby commented Jun 9, 2017

Problem: Certain region names are being cut off in vcards with longer addresses where the line requires folding. Issue is occuring when opened with "Windows Contacts" on Windows 10.

Is there something wrong with this vcard? It seems correct at first glance.

Thanks!

Example vcard with problem

BEGIN:VCARD
VERSION:3.0
REV:2017-06-08T23:24:49Z
N;CHARSET=utf-8:Doe;John;;;
FN;CHARSET=utf-8:John Doe
ADR;WORK;POSTAL;CHARSET=utf-8:;;555 East Flours Street 88th Floor;Los Ang
 eles;CA;55555;
TEL;PREF;WORK:5555555555
TITLE;CHARSET=utf-8:Example
END:VCARD

Related spec info

3.2. Line Delimiting and Folding

Individual lines within vCard are delimited by the [RFC5322] line
break, which is a CRLF sequence (U+000D followed by U+000A). Long
logical lines of text can be split into a multiple-physical-line
representation using the following folding technique. Content lines
SHOULD be folded to a maximum width of 75 octets, excluding the line
break. Multi-octet characters MUST remain contiguous. The rationale
for this folding process can be found in [RFC5322], Section 2.1.1.

A logical line MAY be continued on the next physical line anywhere
between two characters by inserting a CRLF immediately followed by a
single white space character (space (U+0020) or horizontal tab
(U+0009)). The folded line MUST contain at least one character. Any
sequence of CRLF followed immediately by a single white space
source: https://tools.ietf.org/html/rfc6350#section-3.2

@claytoncollie
Copy link

claytoncollie commented Sep 12, 2017

in VCard.php, remove . $this->getCharsetString() on line 97

@mrcage
Copy link

mrcage commented Apr 13, 2018

Confirmed, I just experienced the same issue.

@jeroendesloovere
Copy link
Owner

@wadmiraal can you check this?

@wadmiraal
Copy link
Contributor

We should definitely not remove the CHARSET string. However, it does seem that the folding is happening too soon. RFC6350 says lines should fold at row 75, but VCard.php was folding at 73.

I updated the folding, and added a test to confirm with the above address. It should work now.

jeroendesloovere added a commit that referenced this issue Jul 4, 2018
@jeroendesloovere
Copy link
Owner

Fixed by #131
We released a new version 1.7.1 for this.

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

No branches or pull requests

5 participants