Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Set Java compiler default encoding to UTF-8 #238

Merged
merged 1 commit into from
Nov 4, 2018
Merged

Set Java compiler default encoding to UTF-8 #238

merged 1 commit into from
Nov 4, 2018

Conversation

matt9ucci
Copy link
Contributor

@matt9ucci matt9ucci commented Nov 4, 2018

PR description

allprojects {
  tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
  }
}

Fixed Issue(s)

When running the build script on Windows 10, the following warnings are displayed:

PS> .\gradlew.bat build -x test
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :crypto:compileJava
C:\pantheon\crypto\src\main\java\tech\pegasys\pantheon\crypto\SECP256K1.java:141: error: unmappable character (0x88) for encoding windows-31j
    // routine specified in Section 2.3.7, where mlen = 竚?(log2 p)/8竚? or mlen = 竚?m/8竚?.
                                                         ^
C:\pantheon\crypto\src\main\java\tech\pegasys\pantheon\crypto\SECP256K1.java:141: error: unmappable character (0x89) for encoding windows-31j
    // routine specified in Section 2.3.7, where mlen = 竚?(log2 p)/8竚? or mlen = 竚?m/8竚?.
                                                                     ^
C:\pantheon\crypto\src\main\java\tech\pegasys\pantheon\crypto\SECP256K1.java:141: error: unmappable character (0x88) for encoding windows-31j
    // routine specified in Section 2.3.7, where mlen = 竚?(log2 p)/8竚? or mlen = 竚?m/8竚?.
                                                                                  ^
C:\pantheon\crypto\src\main\java\tech\pegasys\pantheon\crypto\SECP256K1.java:141: error: unmappable character (0x89) for encoding windows-31j
    // routine specified in Section 2.3.7, where mlen = 竚?(log2 p)/8竚? or mlen = 竚?m/8竚?.

These warnings are caused by windows-31j, default Japanese encoding of my PC.

The similar kind of warnings/errors are likely to happen in the other language environments. It will be nice to set the default encoding explicitly.

Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@ajsutton ajsutton merged commit af9ea53 into PegaSysEng:master Nov 4, 2018
@matt9ucci matt9ucci deleted the patch-compiler-encoding branch November 4, 2018 10:02
shemnon pushed a commit to shemnon/pantheon that referenced this pull request Nov 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants