Sonar-scanner does not accept files with encoding UCS-2 LE BOM


(Andre Pany) #1

Hi,

on Windows 10, PowerShell is the default terminal. The tool dscanner will write issues using the
“SonarQube external issue json format” to STDOUT. I pipe this output to a file.

dscanner --report . > sqei.json

While this works fine in the command prompt, the same command in PowerShell will create
a JSON file with encoding UCS-2 LE BOM. sonar-scanner fails for this JSON file.

Could you check whether you can enhance sonar-scanner to accept also this encoding?

Kind regards
André


(Elena Vilchik) #2

You can probably readdress your problem to dlang-community -> https://github.com/dlang-community/D-Scanner/issues/new


(Andre Pany) #3

The issue is not directly related to dscanner but for all tools which writes the output to STDOUT and you
pipe the output to a file. (Writing to STDOUT and piping is a OS Terminal feature, available on Windows / POSIX).
A lot of other tools which works by piping and will now also fail if you start them from Windows 10 Powershell.

Kind regards
André