Index: src/libchcore/TConfig.cpp =================================================================== diff -u -re8f31b0f922b402878356e130c866c4f3682a7f5 -r9615294eb17ad0693fc193cca8b972ecb11428fa --- src/libchcore/TConfig.cpp (.../TConfig.cpp) (revision e8f31b0f922b402878356e130c866c4f3682a7f5) +++ src/libchcore/TConfig.cpp (.../TConfig.cpp) (revision 9615294eb17ad0693fc193cca8b972ecb11428fa) @@ -39,6 +39,7 @@ #include "ErrorCodes.h" #include "TCoreException.h" #include "ISerializerRowData.h" +#include namespace chcore { @@ -88,6 +89,9 @@ boost::property_tree::wiptree tPropertyTree; std::wifstream ifs(pszFile, std::ios_base::in); + std::locale utf8bom(std::locale(), new std::codecvt_utf8); + ifs.imbue(utf8bom); + boost::property_tree::xml_parser::read_xml(ifs, tPropertyTree); boost::unique_lock lock(GetImpl()->m_lock); @@ -101,6 +105,10 @@ GetImpl()->ExportToPropertyTree(tPropertyTree); std::wofstream ofs(GetImpl()->m_strFilePath.c_str(), std::ios_base::out); + + std::locale utf8bom(std::locale(), new std::codecvt_utf8); + ofs.imbue(utf8bom); + boost::property_tree::xml_parser::write_xml(ofs, tPropertyTree); }