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

Support for RFC 6868 #54

Closed
rfc2822 opened this issue May 23, 2016 · 3 comments
Closed

Support for RFC 6868 #54

rfc2822 opened this issue May 23, 2016 · 3 comments

Comments

@rfc2822
Copy link
Contributor

rfc2822 commented May 23, 2016

Double-quotes can't be encoded with plain VCard 3/4. This is why RFC 6868 specifies a way to encode " (and \n) using the newly introduced ^ escape character.

It might be worth a thought whether RFC 6868 could be implemented in ez-vcard (and maybe enabled by default, and/or enabled/disabled by a configuration option). At the moment, I don't know any platforms implementing RFC 6868, but users are (understandably) confused by the fact that they can't create contacts with " in fields like the address LABEL, and RFC 6868 seems the only practicable solution for this problem.

Thanks for your great work.

@mangstadt
Copy link
Owner

Hey rfc,

ez-vcard already supports this. It's turned off by default for write operations and turned on by default for read operations. Use the VCardWriter.setCaretEncodingEnabled method to turn it on.

VCard vcard = ...
VCardWriter writer = ...
writer.setCaretEncodingEnabled(true);
writer.write(vcard);

@rfc2822
Copy link
Contributor Author

rfc2822 commented May 24, 2016

Ah, cool. Didn't see it in the API. Thanks

@mangstadt
Copy link
Owner

No problem. Thank you for writing.

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

2 participants