Commit 3b51343e authored by Justin Goshi's avatar Justin Goshi Committed by Brad King
Browse files

VS: Emit UTF-8 BOM for generated solution files

We write UTF-8-encoded content to the `.sln` files, so tell VS to read
them as such.

Fixes: #19594
parent c41c7928
......@@ -104,6 +104,9 @@ const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const
void cmGlobalVisualStudioGenerator::WriteSLNHeader(std::ostream& fout)
char utf8bom[] = { char(0xEF), char(0xBB), char(0xBF) };
fout.write(utf8bom, 3);
switch (this->Version) {
case cmGlobalVisualStudioGenerator::VS9:
fout << "Microsoft Visual Studio Solution File, Format Version 10.00\n";
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment