Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Common/Convert.cpp (1 of 18 files). Show all
Unified · Split
| @@ -25,7 +25,7 @@ · 24 unmodified lines | |||
| 25 | #include <iomanip> | 25 | #include <iomanip> |
| 26 | #include <sstream> | 26 | #include <sstream> |
| 27 | #include <locale> | 27 | #include <locale> |
| 28 | #include <codecvt> | 28 | #include <boost/locale.hpp> |
| 29 | #include <boost/uuid/uuid_io.hpp> | 29 | #include <boost/uuid/uuid_io.hpp> |
| 30 | #include <boost/uuid/string_generator.hpp> | 30 | #include <boost/uuid/string_generator.hpp> |
| 31 | #include <boost/date_time/posix_time/posix_time.hpp> | 31 | #include <boost/date_time/posix_time/posix_time.hpp> |
| @@ -36,6 +36,7 @@ · 4 unmodified lines | |||
| 36 | using namespace std; | 36 | using namespace std; |
| 37 | using namespace std::chrono; | 37 | using namespace std::chrono; |
| 38 | using namespace boost::uuids; | 38 | using namespace boost::uuids; |
| 39 | using namespace boost::locale::conv; | ||
| 39 | using namespace boost::posix_time; | 40 | using namespace boost::posix_time; |
| 40 | using namespace boost::gregorian; | 41 | using namespace boost::gregorian; |
| 41 | using namespace GSF; | 42 | using namespace GSF; |
| @@ -270,14 +271,12 @@ std::string GSF::ToString(const TimeSpan& value) · 228 unmodified lines | |||
| 270 | 271 | ||
| 271 | wstring GSF::ToUTF16(const string& value) | 272 | wstring GSF::ToUTF16(const string& value) |
| 272 | { | 273 | { |
| 273 | wstring_convert<codecvt_utf8<wchar_t>, wchar_t> converter; | 274 | return utf_to_utf<wchar_t>(value); |
| 274 | return converter.from_bytes(value); | ||
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | string GSF::ToUTF8(const wstring& value) | 277 | string GSF::ToUTF8(const wstring& value) |
| 278 | { | 278 | { |
| 279 | wstring_convert<codecvt_utf8<wchar_t>, wchar_t> converter; | 279 | return utf_to_utf<char>(value); |
| 280 | return converter.to_bytes(value); | ||
| 281 | } | 280 | } |
| 282 | 281 | ||
| 283 | bool GSF::ParseBoolean(const string& value) | 282 | bool GSF::ParseBoolean(const string& value) |