From 867fdce4e4fef467c5c2efab41f2a0d5764fffd5 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Fri, 9 Mar 2018 16:28:00 -0800 Subject: [PATCH] Gcc-4.8 doesn't have std::codecvt. Use boost::locale::conv::utf_to_utf instead. --- libgnucash/engine/gnc-numeric.cpp | 5 +++-- libgnucash/engine/gnc-numeric.hpp | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libgnucash/engine/gnc-numeric.cpp b/libgnucash/engine/gnc-numeric.cpp index 3d540056b8..ee38dbb746 100644 --- a/libgnucash/engine/gnc-numeric.cpp +++ b/libgnucash/engine/gnc-numeric.cpp @@ -37,6 +37,7 @@ extern "C" #include #include +#include #include #include @@ -1307,11 +1308,11 @@ main(int argc, char ** argv) std::ostream& operator<<(std::ostream& s, GncNumeric n) { + using boost::locale::conv::utf_to_utf; std::basic_ostringstream ss; ss.imbue(s.getloc()); ss << n; - std::wstring_convert> make_utf8; - s << make_utf8.to_bytes(ss.str()); + s << utf_to_utf(ss.str()); return s; } diff --git a/libgnucash/engine/gnc-numeric.hpp b/libgnucash/engine/gnc-numeric.hpp index a22f89bd43..848025179e 100644 --- a/libgnucash/engine/gnc-numeric.hpp +++ b/libgnucash/engine/gnc-numeric.hpp @@ -27,7 +27,6 @@ #include #include #include // For std::bad_cast exception -#include // UTF-8 <--> UTF16 conversion #include "gnc-rational-rounding.hpp" class GncRational;