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