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

Encoding.QUOTED_PRINTABLE to upper case #56

Closed
ekorn opened this issue Jun 7, 2016 · 5 comments
Closed

Encoding.QUOTED_PRINTABLE to upper case #56

ekorn opened this issue Jun 7, 2016 · 5 comments

Comments

@ekorn
Copy link

ekorn commented Jun 7, 2016

in the Windows 10 Contact Application everything that is marked with "ENCODING=quoted-printable" in lower case is misinterpreted. When it is changed to ENCODING=QUOTED-PRINTABLE in upper case it works fine.
I guess it is more a problem of the Win 10 Contact App.

@mangstadt
Copy link
Owner

Nico,

Thank you for the report. Can you post an example of a vCard that Windows 10 doesn't like? I want to make sure there's nothing else wrong with the vCard. Thank you.

@ekorn
Copy link
Author

ekorn commented Jun 13, 2016

@mangstadt
Copy link
Owner

Thank you. Is "Windows 10 Contact Application" the actual name of the application?

@mangstadt
Copy link
Owner

Fixed in e2a4dd3. Thanks for reporting this.

Call VCardWriter.setTargetApplication() like so:

VCard vcard = new VCard();
FormattedName fn = vcard.setFormattedName("Dipl. Päd. Konsovkow");
fn.getParameters().setEncoding(Encoding.QUOTED_PRINTABLE);

VCardWriter writer = new VCardWriter(System.out, VCardVersion.V3_0);
writer.setTargetApplication(TargetApplication.WINDOWS_10_CONTACTS);
writer.write(vcard);
writer.close();

Output:

BEGIN:VCARD
VERSION:3.0
PRODID:ez-vcard 0.9.11-SNAPSHOT
FN;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:Dipl. P=C3=A4d. Konsovkow
END:VCARD

@mangstadt
Copy link
Owner

Addendum: I decided to instead change the parameter value on the Encoding.QUOTED_PRINTABLE object. This is solution is not only simpler, but also a little bit more spec-compliant because the 2.1 specification does not say anything about this parameter value being case-insensitive. I also converted the "BASE64", "7BIT", and "8BIT" parameter values to uppercase for the same reason.

See: a960585

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