mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 20:46:37 +08:00
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
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user