diff options
-rw-r--r-- | Source/cmGlobalVisualStudio71Generator.cxx | 5 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index a67a649..64f9cee 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -93,6 +93,11 @@ void cmGlobalVisualStudio71Generator cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators) { +#ifdef CMAKE_ENCODING_UTF8 + // Add UTF-8 BOM for .sln file to indicate encoding + const unsigned char utf8_bom[3] = {0xEF,0xBB,0xBF}; + fout.write(reinterpret_cast<const char*>(utf8_bom), 3); +#endif // Write out the header for a SLN file this->WriteSLNHeader(fout); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 401e475..0eb7d2c 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -558,6 +558,11 @@ void cmGlobalVisualStudio7Generator cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators) { +#ifdef CMAKE_ENCODING_UTF8 + // Add UTF-8 BOM for .sln file to indicate encoding + const unsigned char utf8_bom[3] = {0xEF,0xBB,0xBF}; + fout.write(reinterpret_cast<const char*>(utf8_bom), 3); +#endif // Write out the header for a SLN file this->WriteSLNHeader(fout); |