-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent powershell from adding a BOM to test input #3595
Conversation
I'm not sure I understand what the actual issue is. But the following PowerShell command should read a file (with or without BOM) and write it without BOM (as long as those files only contain ASCII characters):
|
The problem is that on "some" Windows hosts in Azure, powershell´s Get-Content prepends a BOM to anything it pipes into an external program, and none of the various internet recipes I tried got it to stop doing that. This behaviour breaks some of the BLAS tests where the name of the output file to create is written as the first parameter in the input file for the test. As the (Fortran) test code does not support UTF, it simply adds the character pattern of the BOM to the filename, the test succeeds but the subsequent check does not find the expected file and reports a failure. |
By default on the system I'm testing, the input encoding is set to ibm850. That might be the reason I didn't see this locally.
It might be a good idea to unconditionally set the console input encoding to UTF-8 without BOM in that .ps1 script. That way the pipes should behave pretty similarly to what they do on modern Linux:
|
Thank you for the suggestion - it seems this was not among the many variations I tried in #3563. |
fixes #3594 as suggested by mmuetzel