summaryrefslogtreecommitdiff
path: root/src/pugixml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r--src/pugixml.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 0646f8b..30ed7aa 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -2605,13 +2605,10 @@ namespace pugi
std::ofstream out(name, std::ios::out);
if (!out) return false;
- if (flags & format_write_bom)
+ if (flags & format_write_bom_utf8)
{
- if (flags & format_utf8)
- {
- static const unsigned char utf8_bom[] = {0xEF, 0xBB, 0xBF};
- out.write(reinterpret_cast<const char*>(utf8_bom), 3);
- }
+ static const unsigned char utf8_bom[] = {0xEF, 0xBB, 0xBF};
+ out.write(reinterpret_cast<const char*>(utf8_bom), 3);
}
out << "<?xml version=\"1.0\"?>";