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

indent for android #1

Closed
hius74 opened this issue Mar 1, 2017 · 1 comment
Closed

indent for android #1

hius74 opened this issue Mar 1, 2017 · 1 comment

Comments

@hius74
Copy link

hius74 commented Mar 1, 2017

Current realization FoldedLineWriter indent always one char. The result output is
FN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:10 =D0=AD=D1=82=D0=B0=D0=B6 =D0=
=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9

Second line (continue from FN) has first chards ' ' (space) as default indent.

when import vcard file on android phone I has error. Android not support space in as first characters.

Please, allow in file com.github.mangstadt.vinnie.io.FoldedLineWriter set empty indent.
public void setIndent(String indent) {
if (indent.length() == 0) {
throw new IllegalArgumentException("Indent string cannot be empty.");
}
replace
if (indent == null || indent.length() == 0) {
this.indent = "";
}

As a result: - no space on second line and vCard correct import on Android phone,
FN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:10 =D0=AD=D1=82=D0=B0=D0=B6 =D0= =A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9

Thanks.

@mangstadt
Copy link
Owner

Thanks for the report. Fixed in 9235609.

Workaround: Disable line folding altogether.

VObjectWriter writer = ...
writer.getFoldedLineWriter().setLineLength(null);

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