strip UTF-8 BOM when reading SKILL.md in quick_validate (#93811) (opens in new tab)
strip UTF-8 BOM when reading SKILL\.md in quick\_validate \(\#93811\) The previous \`read\_text\(encoding=\"utf-8\"\)\` call left the UTF-8 byte order mark \(EF BB BF, three bytes\) in the content string if the file was saved by a tool that emits a BOM\. The first line check \(\`lines\[0\]\.strip\(\) \!= \"---\"\`\) then saw \"\ufeff---\" and rejected the file as \"Invalid frontmatter format\", even though the document was otherwise valid frontmatter\. Co-authored-by: Zo Bot
Read the original article