You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
YAML with UTF-8 BOM are not handled correctly #5502
If you use YAMLs for the manifest and use UTF-8 with BOM, the first line is completely ignored. The first line usually holds the schema header. This might be a problem for a long time, but headers are checked now and if you use UTF-8 with BOM, the checks will fail.
Currently UTF-8 with BOM only works, if you place the schema header in the second line, leaving the first line blank. Or using UTF-8 without BOM.
Steps to reproduce
Use a YAML with UTF-8 with BOM, place the schema-header in the first line and run the validate
Expected behavior
The obe described usage should work
Actual behavior
The first line is ignored
Environment
Windows-Paket-Manager (Vorschau) v1.11.320-preview
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
Windows: Windows.Desktop v10.0.26100.4061
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.26.320.0
The current azure tests will fail also!
Unfortunately YAML is not an allowed file type. But you can have a look on \manifests\t\TUitTUWien\TUtoolbox\2025.1.0.707\TUitTUWien.TUtoolbox.installer.yaml
Or is there another way to upload a file?
To upgrade to our current version I needed to save the manifest without BOM and the schema header was recognized. So this is working:
\manifests\t\TUitTUWien\TUtoolbox\2025.1.0.711\TUitTUWien.TUtoolbox.installer.yaml
Alternatively, you can save it without BOM using any editor. However, this is still a bug in Winget. The BOM may never lead to the first line being ignored.
The less BOMs there are in the ecosystem the better. Better to enforce a strict UTF-8 without BOM everywhere. Seeing more and more people move away from BOM as it's weird and causes issues and the problem it tried to fix really doesn't exist anymore with modern editors and programs.
Activity
denelon commentedon Jun 2, 2025
Can you provide an example of what you're expecting to work?
chbwien commentedon Jun 2, 2025
Unfortunately YAML is not an allowed file type. But you can have a look on \manifests\t\TUitTUWien\TUtoolbox\2025.1.0.707\TUitTUWien.TUtoolbox.installer.yaml
Or is there another way to upload a file?
To upgrade to our current version I needed to save the manifest without BOM and the schema header was recognized. So this is working:
\manifests\t\TUitTUWien\TUtoolbox\2025.1.0.711\TUitTUWien.TUtoolbox.installer.yaml
Trenly commentedon Jun 2, 2025
If you use a tool such as YamlCreate, WinGet Create, or Komac, the files will be output in the correct format and will not have the BOM
chbwien commentedon Jun 3, 2025
Alternatively, you can save it without BOM using any editor. However, this is still a bug in Winget. The BOM may never lead to the first line being ignored.
denelon commentedon Jul 8, 2025
YAML intrinsically supports UTF-8.
I don't see any reason to do extra work to support a BOM when it isn't required.
denelon commentedon Jul 10, 2025
Thanks Kaleb Luedtke (@Trenly)!
Frulfump commentedon Jul 25, 2025
The less BOMs there are in the ecosystem the better. Better to enforce a strict UTF-8 without BOM everywhere. Seeing more and more people move away from BOM as it's weird and causes issues and the problem it tried to fix really doesn't exist anymore with modern editors and programs.