gnucash unstable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Fri Mar 9 19:28:16 EST 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/867fdce4 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/10b7cbc2 (commit)
	from  https://github.com/Gnucash/gnucash/commit/c9f3c076 (commit)



commit 867fdce4e4fef467c5c2efab41f2a0d5764fffd5
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Mar 9 16:28:00 2018 -0800

    Gcc-4.8 doesn't have std::codecvt.
    
    Use boost::locale::conv::utf_to_utf instead.

diff --git a/libgnucash/engine/gnc-numeric.cpp b/libgnucash/engine/gnc-numeric.cpp
index 3d54005..ee38dbb 100644
--- a/libgnucash/engine/gnc-numeric.cpp
+++ b/libgnucash/engine/gnc-numeric.cpp
@@ -37,6 +37,7 @@ extern "C"
 
 #include <stdint.h>
 #include <boost/regex.hpp>
+#include <boost/locale/encoding_utf.hpp>
 #include <sstream>
 #include <cstdlib>
 
@@ -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<wchar_t> ss;
     ss.imbue(s.getloc());
     ss << n;
-    std::wstring_convert<std::codecvt_utf8<wchar_t>> make_utf8;
-    s << make_utf8.to_bytes(ss.str());
+    s << utf_to_utf<char>(ss.str());
     return s;
 }
 
diff --git a/libgnucash/engine/gnc-numeric.hpp b/libgnucash/engine/gnc-numeric.hpp
index a22f89b..8480251 100644
--- a/libgnucash/engine/gnc-numeric.hpp
+++ b/libgnucash/engine/gnc-numeric.hpp
@@ -27,7 +27,6 @@
 #include <iostream>
 #include <locale>
 #include <typeinfo> // For std::bad_cast exception
-#include <codecvt> // UTF-8 <--> UTF16 conversion
 #include "gnc-rational-rounding.hpp"
 
 class GncRational;

commit 10b7cbc2574c048a1bf0b0c84ec66241fafdc18e
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Mar 9 16:24:16 2018 -0800

    Fix boost linking problem on Unbuntu 14.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86607a1..dbf92a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -511,7 +511,7 @@ SET (Boost_FIND_QUIETLY ON)
 IF (NOT DEFINED ${BOOST_ROOT})
   SET(BOOST_ROOT $ENV{BOOST_ROOT})
 ENDIF()
-FIND_PACKAGE (Boost 1.54.0 REQUIRED COMPONENTS date_time regex locale filesystem)
+FIND_PACKAGE (Boost 1.54.0 REQUIRED COMPONENTS date_time regex locale filesystem system)
 
 IF (Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})



Summary of changes:
 CMakeLists.txt                    | 2 +-
 libgnucash/engine/gnc-numeric.cpp | 5 +++--
 libgnucash/engine/gnc-numeric.hpp | 1 -
 3 files changed, 4 insertions(+), 4 deletions(-)



More information about the gnucash-changes mailing list