benchmarks_ci.py crashes with character encoding issue on Czech Windows with Win1250 encoding
- Dominant language
- F#
- Stars
- 773
- Forks
- 301
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 15
Description
I am unable to run `benchmarks_ci.py` on my private machine with Czech Windows. Running it results in the following error while parsing `dotnet --info` output:
```
[2022/01/10 17:28:00][INFO] $ dotnet --info
Traceback (most recent call last):
File ".\performance\scripts\benchmarks_ci.py", line 253, in
__main(sys.argv[1:])
File ".\performance\scripts\benchmarks_ci.py", line 203, in __main
dotnet.info(verbose=verbose)
File "G:\git\performance\scripts\dotnet.py", line 40, in info
RunCommand(cmdline, verbose=verbose).run()
File "G:\git\performance\scripts\performance\common.py", line 218, in run
(returncode, quoted_cmdline) = self.__runinternal(working_directory)
File "G:\git\performance\scripts\performance\common.py", line 206, in __runinternal
for line in iter(proc.stdout.readline, ''):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xec in position 36: invalid continuation byte
```
The output of the `dotnet --info` contains some czech characters. The Windows 1250 is the default encoding on this version of Windows.
The output of the `dotnet --info` starts like this:
```
G:\git>dotnet --info
Sada .NET SDK (s ohledem na libovolný soubor global.json):
Version: 6.0.100-rc.2.21505.57
Commit: ab39070116
Běhové prostředí:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.100-rc.2.21505.57\
```
It seems that the issue was introduced by #2108 that seems to assume that Windows always use UTF-8 encoding.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.