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

manpage generator: encoding issue #1109

Closed
deining opened this issue Jun 14, 2020 · 1 comment
Closed

manpage generator: encoding issue #1109

deining opened this issue Jun 14, 2020 · 1 comment
Labels
theme: codegen An issue or change related to the picocli-codegen module type: enhancement ✨
Milestone

Comments

@deining
Copy link
Contributor

deining commented Jun 14, 2020

Using the new man page generation feature, I tried to generate a man page for the I18NDemo given in the examples section of the repo.

When invoking ascciidoctor on the produced .adoc file, I'm getting:

Failed to load AsciiDoc document - invalid byte sequence in UTF-8

I can easily cure this by adding the encoding attribute to the produced .adoc file:

// tag::picocli-generated-full-manpage[]
// tag::picocli-generated-man-section-header[]
:doctype: manpage
:encoding: ISO-8859-1

IMHO, encoding is something that should be considered by the man page generator.
AFAIK, since Java 9, to can use UTF-8 encoding for your resource bundles, so simply adding the encoding attribute to the generated file seems to be no valid option for me. Maybe we can overcome this by adding an additional encoding option to the gen-manpage command?

@remkop
Copy link
Owner

remkop commented Jun 15, 2020

I see, yes that makes sense.
The default value would be the platform encoding, I guess.
Sounds like a good idea.
Will you be able to provide a pull request for this?

@remkop remkop added this to the 4.4 milestone Jun 15, 2020
@remkop remkop added theme: codegen An issue or change related to the picocli-codegen module type: enhancement ✨ labels Jun 15, 2020
remkop added a commit that referenced this issue Jun 16, 2020
PR: manpage generator: overcome encoding issues (#1109)
@deining deining closed this as completed Jun 17, 2020
remkop added a commit that referenced this issue Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: codegen An issue or change related to the picocli-codegen module type: enhancement ✨
Projects
None yet
Development

No branches or pull requests

2 participants