From 31658465434e747ed7a371485544be83aae45343 Mon Sep 17 00:00:00 2001 From: Bob Jelica Date: Tue, 5 Mar 2024 16:36:54 +0100 Subject: [PATCH] Force utf8 before grepping --- shared.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared.sh b/shared.sh index 4698477..5f8c099 100644 --- a/shared.sh +++ b/shared.sh @@ -68,13 +68,13 @@ fi function grep_p() { if [[ "${use_perl}" == 'true' ]] ; then - LC_ALL=C perl -ne "print if /${1}/" + LC_ALL=C.UTF-8 perl -ne "print if /${1}/" elif [[ "${use_gnugrep}" == 'true' ]] ; then # shellcheck disable=SC2086 - LC_ALL=C ggrep -P "${1}" + LC_ALL=C.UTF-8 ggrep -P "${1}" else # shellcheck disable=SC2086 - LC_ALL=C command grep -P "${1}" + LC_ALL=C.UTF-8 command grep -P "${1}" fi }