Sorna scanner incorrect anyalysis encoding

env

  • SonarQube 8.3, Scanner 4.2.0.1873 for windows, sonar-scanner ant 2.7.0.1612
  • not error report but appear incorrect encoding
  • re analysis
  • source encoding, euc-kr, sonar scanner
  • local eclipse and source code is euc-kr encoding

step

  1. run analysis on eclipse sonar scanner or ant build

  2. few source report file(local scanner-report result has incorrect encoding) incorrect encoding but source encoding correct. many other source file encoding correct. only few file incorrect

  3. sonarqube server appear source incorrect encoding that incorrect scanner result file

  4. correct encoding source and eclipse screen

  5. incorrect anlaysis result file

how to resolve this?

Hi,

Welcome to the community!

What are you setting encoding to in your analysis parameters?

 
Ann

I use this parameter.

    <property name="sonar.host.url" value="http://myserver:9000"/>
    <property name="sonar.sourceEncoding" value="EUC-KR"/>
    <property name="sonar.java.source" value="1.6"/>
    <property name="sonar.projectKey" value="projectName"/>
    <property name="sonar.login" value="loginToken"/>
    <property name="sonar.projectBaseDir" value="/projectDir"/>
    <property name="sonar.sources" value="./src/main/java"/>
    <property name="sonar.java.binaries" value="./dist/classes"/>
    <property name="sonar.java.libraries" value="./webapps/WEB-INF/lib"/>