From 414326952cd6086ebc491413e8cf58a60ad857a4 Mon Sep 17 00:00:00 2001 From: Julian Fleischer Date: Tue, 7 Aug 2018 11:50:05 +0200 Subject: [PATCH] use export LC_ALL=C.UTF-8 --- .travis.yml | 1 - .travis/test_03_before_install.sh | 2 +- .travis/test_04_install.sh | 2 +- .travis/test_05_before_script.sh | 2 +- .travis/test_06_script.sh | 2 +- test/lint/lint-shell-locale.sh | 5 +++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 102fa9202..7e353ad86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,6 @@ env: - RUN_FUNCTIONAL_TESTS=true - RUN_BENCH=false # Set to true for any one job that has debug enabled, to quickly check bench is not crashing or hitting assertions - DOCKER_NAME_TAG=ubuntu:18.04 - - LC_ALL=C.UTF-8 - BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID - CCACHE_SIZE=100M - CCACHE_TEMPDIR=/tmp/.ccache-temp diff --git a/.travis/test_03_before_install.sh b/.travis/test_03_before_install.sh index 8026a96f8..d091a67ca 100755 --- a/.travis/test_03_before_install.sh +++ b/.travis/test_03_before_install.sh @@ -4,7 +4,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -export LC_ALL=C +export LC_ALL=C.UTF-8 PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g") export PATH diff --git a/.travis/test_04_install.sh b/.travis/test_04_install.sh index aa47dfccb..ef595287b 100755 --- a/.travis/test_04_install.sh +++ b/.travis/test_04_install.sh @@ -4,7 +4,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -export LC_ALL=C +export LC_ALL=C.UTF-8 travis_retry docker pull "$DOCKER_NAME_TAG" env | grep -E '^(CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL)' | tee /tmp/env diff --git a/.travis/test_05_before_script.sh b/.travis/test_05_before_script.sh index eeeceed57..70caee979 100755 --- a/.travis/test_05_before_script.sh +++ b/.travis/test_05_before_script.sh @@ -4,7 +4,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -export LC_ALL=C +export LC_ALL=C.UTF-8 DOCKER_EXEC echo \> \$HOME/.bitcoin # Make sure default datadir does not exist and is never read by creating a dummy file diff --git a/.travis/test_06_script.sh b/.travis/test_06_script.sh index 30096eff8..dd4633039 100755 --- a/.travis/test_06_script.sh +++ b/.travis/test_06_script.sh @@ -4,7 +4,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -export LC_ALL=C +export LC_ALL=C.UTF-8 TRAVIS_COMMIT_LOG=$(git log --format=fuller -1) export TRAVIS_COMMIT_LOG diff --git a/test/lint/lint-shell-locale.sh b/test/lint/lint-shell-locale.sh index 242b27c76..efd8081b8 100755 --- a/test/lint/lint-shell-locale.sh +++ b/test/lint/lint-shell-locale.sh @@ -5,7 +5,8 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Make sure all shell scripts: -# a.) explicitly opt out of locale dependence using "export LC_ALL=C", or +# a.) explicitly opt out of locale dependence using +# "export LC_ALL=C" or "export LC_ALL=C.UTF-8", or # b.) explicitly opt in to locale dependence using the annotation below. export LC_ALL=C @@ -16,7 +17,7 @@ for SHELL_SCRIPT in $(git ls-files -- "*.sh" | grep -vE "src/(secp256k1|univalue continue fi FIRST_NON_COMMENT_LINE=$(grep -vE '^(#.*|)$' "${SHELL_SCRIPT}" | head -1) - if [[ ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C" ]]; then + if [[ ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C" && ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C.UTF-8" ]]; then echo "Missing \"export LC_ALL=C\" (to avoid locale dependence) as first non-comment non-empty line in ${SHELL_SCRIPT}" EXIT_CODE=1 fi