diff --git a/ci/lint/01_install.sh b/ci/lint/01_install.sh index 9c2020a9a15..ba04b8966b6 100755 --- a/ci/lint/01_install.sh +++ b/ci/lint/01_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 set -o errexit -o pipefail -o xtrace diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh index a0f2dc88bc4..cb4b3bd69c6 100755 --- a/ci/lint/06_script.sh +++ b/ci/lint/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 set -o errexit -o pipefail -o xtrace diff --git a/cmake/script/macos_zip.sh b/cmake/script/macos_zip.sh index cc51699dc93..3ccb780f85d 100755 --- a/cmake/script/macos_zip.sh +++ b/cmake/script/macos_zip.sh @@ -3,7 +3,7 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or https://opensource.org/license/mit/. -export LC_ALL=C +export LC_ALL=C.UTF-8 if [ -n "$SOURCE_DATE_EPOCH" ]; then find . -exec touch -d "@$SOURCE_DATE_EPOCH" {} + diff --git a/contrib/devtools/check-deps.sh b/contrib/devtools/check-deps.sh index 0ae817254d7..5b36b818966 100755 --- a/contrib/devtools/check-deps.sh +++ b/contrib/devtools/check-deps.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export LC_ALL=C +export LC_ALL=C.UTF-8 set -Eeuo pipefail # Declare paths to libraries diff --git a/contrib/devtools/gen-bitcoin-conf.sh b/contrib/devtools/gen-bitcoin-conf.sh index 056182524b6..88e36eceba7 100755 --- a/contrib/devtools/gen-bitcoin-conf.sh +++ b/contrib/devtools/gen-bitcoin-conf.sh @@ -3,7 +3,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 TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} BUILDDIR=${BUILDDIR:-$TOPDIR/build} BINDIR=${BINDIR:-$BUILDDIR/bin} diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh index efb0d247207..da458dd96d0 100755 --- a/contrib/macdeploy/detached-sig-create.sh +++ b/contrib/macdeploy/detached-sig-create.sh @@ -3,7 +3,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 set -e SIGNAPPLE=signapple diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh index 4e4237084e1..45f52ed30aa 100755 --- a/contrib/qos/tc.sh +++ b/contrib/qos/tc.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 #network interface on which to limit traffic IF="eth0" #limit of the network interface in question diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh index bcb117f19a0..bed61aae927 100755 --- a/contrib/verify-commits/gpg.sh +++ b/contrib/verify-commits/gpg.sh @@ -3,7 +3,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 INPUT=$(cat /dev/stdin) if [ "$BITCOIN_VERIFY_COMMITS_ALLOW_SHA1" = 1 ]; then printf '%s\n' "$INPUT" | gpg --trust-model always "$@" 2>/dev/null diff --git a/contrib/windeploy/detached-sig-create.sh b/contrib/windeploy/detached-sig-create.sh index f417b04662d..fa3095f7be8 100755 --- a/contrib/windeploy/detached-sig-create.sh +++ b/contrib/windeploy/detached-sig-create.sh @@ -3,7 +3,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 if [ -z "$OSSLSIGNCODE" ]; then OSSLSIGNCODE=osslsigncode fi diff --git a/src/qt/res/animation/makespinner.sh b/src/qt/res/animation/makespinner.sh index ff7b191ba9a..3664b3acc00 100755 --- a/src/qt/res/animation/makespinner.sh +++ b/src/qt/res/animation/makespinner.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 FRAMEDIR=$(dirname "$0") for i in {0..35} do diff --git a/test/lint/commit-script-check.sh b/test/lint/commit-script-check.sh index 08fed219644..d0fc4d3375e 100755 --- a/test/lint/commit-script-check.sh +++ b/test/lint/commit-script-check.sh @@ -11,7 +11,7 @@ # The resulting script should exactly transform the previous commit into the current # one. Any remaining diff signals an error. -export LC_ALL=C +export LC_ALL=C.UTF-8 if test -z "$1"; then echo "Usage: $0 ..." exit 1 diff --git a/test/lint/git-subtree-check.sh b/test/lint/git-subtree-check.sh index 534fadbad71..246474bb857 100755 --- a/test/lint/git-subtree-check.sh +++ b/test/lint/git-subtree-check.sh @@ -3,7 +3,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 check_remote=0 while getopts "?hr" opt; do diff --git a/test/lint/lint-shell-locale.py b/test/lint/lint-shell-locale.py index 80b1d4d0f14..b77812f0e72 100755 --- a/test/lint/lint-shell-locale.py +++ b/test/lint/lint-shell-locale.py @@ -5,8 +5,8 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ -Make sure all shell scripts explicitly opt out of locale dependence using -"export LC_ALL=C" or "export LC_ALL=C.UTF-8", which also enables UTF-8 mode in +Make sure all shell scripts explicitly opt out of locale dependence +using "export LC_ALL=C.UTF-8", which also enables UTF-8 mode in Python. See: https://docs.python.org/3/library/os.html#python-utf-8-mode """ @@ -15,7 +15,6 @@ import sys import re OPT_OUT_LINES = [ - 'export LC_ALL=C', 'export LC_ALL=C.UTF-8', ] @@ -38,7 +37,7 @@ def main(): exit_code = 0 shell_files = get_shell_files_list() for file_path in shell_files: - if re.search('src/(secp256k1|minisketch)/', file_path): + if re.search('src/(ipc/libmultiprocess|secp256k1|minisketch)/', file_path): continue with open(file_path, 'r') as file_obj: @@ -51,7 +50,7 @@ def main(): first_non_comment_line = non_comment_lines[0] if first_non_comment_line not in OPT_OUT_LINES: - print(f'Missing "export LC_ALL=C" (to avoid locale dependence) as first non-comment non-empty line in {file_path}') + print(f'Missing "export LC_ALL=C.UTF-8" (to avoid locale dependence) as first non-comment non-empty line in {file_path}') exit_code = 1 return sys.exit(exit_code)