summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2022-02-17 22:44:25 +0000
committerAndras Timar <andras.timar@collabora.com>2022-02-18 23:07:21 +0100
commitfecc5c6f3891324ffbed2e0c8f94dad9b824d860 (patch)
tree709ac57a8f4c63fdd2a5ac12e4fa3c773c352958 /external
parent8dbd94b017a7a6935d5a6f1eeff847d7e852e08a (diff)
boost: use utf-8 encoding for unknown locales.
More exotic locales like es-419 cannot be parsed by boost, so we fall-back to the default encoding. This avoids an exception: invalid_charset_error of the form: "Invalid or unsupported charset:us-ascii or UTF-8" for this case. Change-Id: I6796dd893ec774b221956ea9febbcc19495d47b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130102 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130146 Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'external')
-rw-r--r--external/boost/UnpackedTarball_boost.mk1
-rw-r--r--external/boost/boost.fallback.encoding.patch13
2 files changed, 14 insertions, 0 deletions
diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 5ffb4197468c..d9ce3525799f 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -17,6 +17,7 @@ boost_patches += boost.utility.Wundef.warnings.patch
boost_patches += boost.noiconv.patch
boost_patches += boost.between.warning.patch
+boost_patches += boost.fallback.encoding.patch
boost_patches += rtti.patch.0
diff --git a/external/boost/boost.fallback.encoding.patch b/external/boost/boost.fallback.encoding.patch
new file mode 100644
index 000000000000..51ac7fc72308
--- /dev/null
+++ b/external/boost/boost.fallback.encoding.patch
@@ -0,0 +1,13 @@
+--- foo/misc/boost.orig/libs/locale/src/util/locale_data.cpp.new 2022-02-17 22:41:27.730549039 +0000
++++ foo/misc/boost/libs/locale/src/util/locale_data.cpp
+@@ -18,8 +18,8 @@
+ language = "C";
+ country.clear();
+ variant.clear();
+- encoding = "us-ascii";
+- utf8=false;
++ encoding = "UTF-8";
++ utf8=true;
+ parse_from_lang(locale_name);
+ }
+