external/boost/UnpackedTarball_boost.mk    |    1 +
 external/boost/boost.between.warning.patch |   13 +++++++++++++
 2 files changed, 14 insertions(+)

New commits:
commit 8dbd94b017a7a6935d5a6f1eeff847d7e852e08a
Author:     Michael Meeks <michael.me...@collabora.com>
AuthorDate: Mon Feb 7 12:05:03 2022 +0000
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 18 23:06:39 2022 +0100

    boost / gettext warning improvement.
    
    std::runtime_exception of:
            "Invalid or unsupported charset:UTF-8 or UTF-8"
    
    is less useful than it could be when spat out from the boost gettext
    impl. Survive for the next (and probably more useful) exception.
    
    Change-Id: Ibeb60b4a34f09f47051844c3e8048f38618d0e05
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129566
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130145
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/external/boost/UnpackedTarball_boost.mk 
b/external/boost/UnpackedTarball_boost.mk
index 838c495c5161..5ffb4197468c 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -16,6 +16,7 @@ boost_patches += boost.6142.warnings.patch.1
 boost_patches += boost.utility.Wundef.warnings.patch
 
 boost_patches += boost.noiconv.patch
+boost_patches += boost.between.warning.patch
 
 boost_patches += rtti.patch.0
 
diff --git a/external/boost/boost.between.warning.patch 
b/external/boost/boost.between.warning.patch
new file mode 100644
index 000000000000..bb4535708549
--- /dev/null
+++ b/external/boost/boost.between.warning.patch
@@ -0,0 +1,13 @@
+diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp 
boost/boost/libs/locale/src/encoding/codepage.cpp
+--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
++++ foo/misc/boost/libs/locale/src/encoding/codepage.cpp
+@@ -58,6 +58,9 @@
+                         return cvt->convert(begin,end);
+                     #endif
+                     #endif
++                  // ensures we get a sensible warning in boost's gettext 
results about a real mismatch.
++                  if (to_charset && from_charset && !strcmp(to_charset, 
from_charset))
++                          return std::string(begin, end - begin);
+                     throw invalid_charset_error(std::string(to_charset) + " 
or " + from_charset);
+                 }
+ 

Reply via email to