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

gradle build command fails due to Cp1252 encoding #99

Open
AhmadHoghooghi opened this issue Mar 4, 2018 · 0 comments
Open

gradle build command fails due to Cp1252 encoding #99

AhmadHoghooghi opened this issue Mar 4, 2018 · 0 comments

Comments

@AhmadHoghooghi
Copy link

Problem

I just downloaded the "strman-java-master" zip file and navigated to its directory. gradle build command failed with this exception:

FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':javadoc'.

Something went wrong with \src\main\java\starman\Ascii.java file.
"unmappable character for encoding Cp1252"

There are lots of errors like this:
C:\strman-java-master\src\main\java\strman\Ascii.java:38: error: unmappable character for encoding Cp1252 put("1", Arrays.asList("┬╣", "Γé?", "█▒"));

Solution

I did some research and solved the problem by adding these lines to gradle.build.
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
javadoc.options.encoding = 'UTF-8'
Since its not reproducible in some cases, I decided to ask for opinions about adding these lines to project.

Context

This is part of gradle --version result:

Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_102 (Oracle Corporation 25.102-b14)
OS: Windows 10 10.0 amd64

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

1 participant