Skip to content

vCard v2.1 (un-)folding: Do not use v3.0/v4.0 folding mechanism #690

@respiranto

Description

@respiranto

v2.1 uses a different folding mechanism to v3.0 and v4.0.

Currently the same mechanism is used as for v3.0 and v4.0.

The docs (vCard 2.1 specs (section 2.1.3), RFC 822#3.1.1) are somewhat confusing (notably, the examples do not match the description), but they say "Unfolding is accomplished by regarding CRLF immediately followed by a LWSP-char as equivalent to the LWSP-char." (LWSP-char is SPACE or HTAB.)

Thus, what I would expect is that unfolding translates \r\n[ \t] to a single SPACE or HTAB, respectively.

W.r.t. folding, the best bet is likely not to fold at all, given that the v2.1 specs do not seem to say anywhere that folding SHOULD or MUST be done. Otherwise, folding should probably only happen on SPACE or HTAB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions