aboutsummaryrefslogtreecommitdiffstats
path: root/testing/bitcoin/20-set-default-env.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/bitcoin/20-set-default-env.patch')
-rw-r--r--testing/bitcoin/20-set-default-env.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/bitcoin/20-set-default-env.patch b/testing/bitcoin/20-set-default-env.patch
index a2e7833c1d..b9717abbc9 100644
--- a/testing/bitcoin/20-set-default-env.patch
+++ b/testing/bitcoin/20-set-default-env.patch
@@ -36,3 +36,22 @@
bool fRet = false;
// Connect bitcoind signal handlers
+--- ./src/qt/bitcoin.cpp.orig
++++ ./src/qt/bitcoin.cpp
+@@ -445,6 +445,16 @@
+ #ifndef BITCOIN_QT_TEST
+ int main(int argc, char *argv[])
+ {
++#ifndef WIN32
++ try
++ {
++ boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid
++ } catch(std::runtime_error &e)
++ {
++ setenv("LC_ALL", "C", 1); // Force C locale
++ }
++#endif
++
+ /// 1. Parse command-line options. These take precedence over anything else.
+ // Command-line options take precedence:
+ ParseParameters(argc, argv);