Details
Description
When a project contains a method wich have non UTF-8 character and the encoding is specified explicitly, as in:
mvn -Dfile.encoding=iso-8859-1 org.codehaus.sonar:sonar-maven-plugin:1.6:sonar
Sonar throws the following error:
[ERROR] Cannot execute the command org.codehaus.sonar:sonar-core-maven-plugin:1.6:collect org.sonar.plugins.api.maven.xml.XmlParserException: can not parse xml : <?xml version="1.0"?> <javancss> ... </javancss> Invalid byte 2 of 3-byte UTF-8 sequence [Fatal Error] :22670:89: Invalid byte 2 of 3-byte UTF-8 sequence.
The problem with JavaNCSS is that it doesn't correctly manage non UTF-8 character, when the encoding to be used is explicitly defined, this encoding should be mentioned in the <?xml version="1.0"?> header.
Issue Links
| This issue depends upon: | ||||
| SONAR-765 | Integrate the new Sonar-Squid core engine (JavaNCSS) |
|
|
|
I forgot to mention that the problem appear with a method that contains an í. I just renamed that method and the problem disappear.