I am running the sonar scanner for my project with (-Dsonar.sourceEncoding=UTF-8) but I am getting the following error.
INFO: SonarQube Scanner 3.2.0.1227
INFO: SonarQube server 8.9.7
INFO: Default locale: "en_US", source code encoding: "UTF-8"
WARN: SonarScanner will require Java 11 to run, starting in SonarQube 9.x
...
ERROR: Error during SonarQube Scanner execution
ERROR: Malformed input or input contains unmappable characters: src/main/html/images/T??cnica.jpg
The word has a tilde.I have tried to exclude the .jpg files and the folder where this file is located but I still get the same error. Any solution?
Solution:
Inside the Jenkins container run the following commands to change the locale
apt-get update && apt-get install -y locales
sed -i '/es_ES.UTF-8/s/^# //g' /etc/locale.gen
locale-gen
update-locale LC_ALL="es_ES.UTF-8"