git: b6ec06f079e1 - main - */*: Use C.UTF-8 locale

From: Tijl Coosemans <tijl_at_FreeBSD.org>
Date: Tue, 30 Jun 2026 20:06:27 UTC
The branch main has been updated by tijl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b6ec06f079e1c883d32c788c0285c6d492eeb1c0

commit b6ec06f079e1c883d32c788c0285c6d492eeb1c0
Author:     Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2026-06-07 16:50:32 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2026-06-30 20:03:57 +0000

    */*: Use C.UTF-8 locale
    
    Ports 02f27a83b44d fixed the ports tree to the C locale so it would work
    correctly in environments where users use a locale that isn't compatible
    with the C locale, e.g. xx_YY.UTF-8 where [A-Z] includes more than just
    upper case letters.  USE_LOCALE was introduced to let ports use another
    locale if they needed it.  The C.UTF-8 locale was created later on to be
    mostly compatible with the C locale.
    
    Switch the ports tree locale to C.UTF-8 and remove USE_LOCALE.  The
    world has moved to Unicode so all ports either require it or know how to
    build correctly in a Unicode environment.
    
    PR:             295945
    Exp-run by:     antoine
---
 Mk/Scripts/dialog4ports.sh                       |  4 ++--
 Mk/Uses/elixir.mk                                |  4 +---
 Mk/Uses/gem.mk                                   |  3 ---
 Mk/Uses/gnome.mk                                 |  4 ----
 Mk/Uses/kde.mk                                   |  2 --
 Mk/Uses/meson.mk                                 |  3 ---
 Mk/Uses/npm.mk                                   |  9 +++------
 Mk/Uses/qt.mk                                    |  5 -----
 Mk/bsd.licenses.mk                               | 10 +++++-----
 Mk/bsd.port.mk                                   | 14 ++++----------
 Tools/scripts/add-port-to-category-makefile.sh   |  2 +-
 Tools/scripts/git-diff-ports.sh                  |  2 +-
 Tools/scripts/git-get-latest-remote-version.sh   |  2 +-
 Tools/scripts/hackage-get-latest-version.sh      |  2 +-
 Tools/scripts/npmjs-fetch-with-dependencies.sh   |  2 +-
 Tools/scripts/npmjs-get-latest-version.sh        |  2 +-
 Tools/scripts/pypi-get-latest-version.sh         |  2 +-
 audio/flac/Makefile                              |  4 ----
 audio/flacon/Makefile                            |  3 +--
 audio/picard/Makefile                            |  1 -
 audio/synthpod-lv2/Makefile                      |  2 +-
 biology/gatk/Makefile                            |  2 +-
 biology/jalview/Makefile                         |  2 --
 deskutils/R-cran-exams/Makefile                  |  3 +--
 deskutils/joplin-desktop/Makefile                |  6 ++----
 devel/R-cran-data.table/Makefile                 |  4 ----
 devel/R-cran-lintr/Makefile                      |  2 --
 devel/R-cran-sessioninfo/Makefile                |  2 --
 devel/R-cran-testthat/Makefile                   |  2 --
 devel/R-cran-vctrs/Makefile                      |  2 --
 devel/aarch64-none-elf-gcc/Makefile              |  9 ---------
 devel/cmake-doc/Makefile                         |  1 -
 devel/cmake-man/Makefile                         |  1 -
 devel/hs-cabal-plan/Makefile                     |  2 --
 devel/hs-git-annex/Makefile                      |  1 -
 devel/hs-hadolint/Makefile                       |  2 --
 devel/hs-haskell-language-server/Makefile        |  2 --
 devel/hs-hlint/Makefile                          |  2 --
 devel/hs-ormolu/Makefile                         |  2 --
 devel/ice37/Makefile                             |  2 +-
 devel/meson-python/Makefile                      |  2 --
 devel/py-appdirs/Makefile                        |  1 -
 devel/py-buildbot/Makefile                       |  2 +-
 devel/py-configparser/Makefile                   |  1 -
 devel/py-cookiecutter/Makefile                   |  9 ++-------
 devel/py-jupyter_console/Makefile                |  1 -
 devel/py-molecule/Makefile                       |  4 ----
 devel/py-pytest-plus/Makefile                    |  2 +-
 devel/py-python-magic/Makefile                   |  2 +-
 devel/py-qt6-qscintilla2/Makefile                |  1 -
 devel/py-wheel/Makefile                          |  2 --
 devel/py-wheel044/Makefile                       |  2 --
 devel/qt6-base/Makefile                          |  1 -
 devel/radicle/Makefile                           |  2 +-
 devel/tcllib/Makefile                            |  1 -
 dns/libpsl/Makefile                              |  1 -
 editors/kakoune/Makefile                         |  1 -
 editors/libreoffice/Makefile                     |  1 -
 editors/tea/Makefile                             |  1 -
 emulators/elliott-803/Makefile                   |  1 -
 filesystems/py-dfvfs/Makefile                    |  4 ----
 finance/fava/Makefile                            |  2 --
 finance/hs-hledger-ui/Makefile                   |  1 -
 finance/hs-hledger-web/Makefile                  |  1 -
 finance/hs-hledger/Makefile                      |  1 -
 french/aster/Makefile                            |  1 -
 games/blackjackclient/Makefile                   |  3 +--
 games/devd-controller-rules/Makefile             |  1 -
 games/doomsday/Makefile                          |  3 ---
 games/jchessboard/Makefile                       |  1 -
 games/luanti/Makefile                            |  2 +-
 graphics/jogl/Makefile                           |  1 -
 graphics/oidn/Makefile                           |  2 +-
 graphics/poppler-qt5/Makefile                    |  3 ---
 graphics/rawtherapee/Makefile                    |  2 +-
 japanese/fcitx5-hazkey/Makefile                  |  3 +--
 japanese/font-myrica/Makefile                    |  3 ---
 japanese/font-myricam/Makefile                   |  3 ---
 java/icedtea-web/Makefile                        |  3 ---
 java/jfreechart/Makefile                         |  1 -
 java/openjdk11/Makefile                          |  4 +---
 java/openjdk17/Makefile                          |  4 +---
 java/openjdk21/Makefile                          |  4 +---
 korean/hunspell/Makefile                         |  2 +-
 lang/bun/Makefile                                |  6 +++---
 lang/elixir-devel/Makefile                       |  1 -
 lang/elixir/Makefile                             |  1 -
 lang/gcc12/Makefile                              |  9 ---------
 lang/ghc/Makefile                                |  1 -
 lang/go/bsd.go.mk                                |  2 --
 lang/kefir/Makefile                              |  1 -
 lang/purescript/Makefile                         |  2 --
 math/apache-commons-math/Makefile                |  1 -
 math/hs-Agda/Makefile                            |  3 ---
 math/py-matplotlib-scalebar/Makefile             |  1 -
 math/scilab-toolbox-swt/Makefile                 |  1 -
 math/scilab/Makefile                             |  1 -
 math/ttmath/Makefile                             |  2 +-
 misc/gemini-cli/Makefile                         |  2 +-
 misc/py-spdx-tools/Makefile                      |  2 +-
 multimedia/ffmpegthumbnailer/Makefile            |  2 --
 multimedia/py-pymediainfo/Makefile               |  3 ---
 net/gerbera/Makefile                             |  2 +-
 net/py-ldap0/Makefile                            |  1 -
 net/py-urllib3/Makefile                          |  3 +--
 net/rabbitmq/Makefile                            |  1 -
 ports-mgmt/porttree/Makefile                     |  2 +-
 security/openvpn-devel/Makefile                  |  2 +-
 security/openvpn/Makefile                        |  2 +-
 security/py-maec/Makefile                        |  1 -
 security/py-plaso/Makefile                       |  3 ---
 security/py-pyopenssl/Makefile                   |  3 +--
 security/xca/Makefile                            |  1 -
 shells/bash-completion/Makefile                  |  4 ----
 sysutils/ansible/Makefile                        |  2 +-
 sysutils/kleene-daemon/Makefile                  |  2 --
 sysutils/openvox-agent8/Makefile                 |  4 ++--
 sysutils/puppet8/Makefile                        |  4 ++--
 sysutils/py-ansible-compat/Makefile              |  2 +-
 sysutils/py-ansible-lint/Makefile                |  2 +-
 sysutils/py-salt/Makefile                        |  3 ---
 textproc/R-cran-hunspell/Makefile                |  2 --
 textproc/docbookrx/Makefile                      |  3 +--
 textproc/ibus-typing-booster/Makefile            |  1 -
 textproc/pageedit/Makefile                       |  2 --
 textproc/py-pikepdf/Makefile                     |  2 --
 textproc/py-sphinxcontrib-programoutput/Makefile |  1 -
 textproc/te-hunspell/Makefile                    |  2 +-
 textproc/translate-shell/Makefile                |  1 -
 textproc/write-good/Makefile                     |  4 ++--
 textproc/xlnt/Makefile                           |  2 +-
 www/chromium/Makefile                            |  2 +-
 www/hs-hjsmin/Makefile                           |  3 ---
 www/jericho-html/Makefile                        |  3 +--
 www/newsraft/Makefile                            |  1 -
 www/onlyoffice-documentserver/Makefile           |  2 --
 www/py-django42/Makefile                         |  3 ---
 www/py-django52/Makefile                         |  3 ---
 www/py-django60/Makefile                         |  3 ---
 www/py-python-digitalocean/Makefile              |  1 -
 www/qutebrowser/Makefile                         |  2 --
 www/ungoogled-chromium/Makefile                  |  2 +-
 x11/foot/Makefile                                |  2 +-
 x11/qimageblitz/Makefile                         |  2 +-
 144 files changed, 73 insertions(+), 285 deletions(-)

diff --git a/Mk/Scripts/dialog4ports.sh b/Mk/Scripts/dialog4ports.sh
index ba8dbb7cd48d..de62a91b583f 100644
--- a/Mk/Scripts/dialog4ports.sh
+++ b/Mk/Scripts/dialog4ports.sh
@@ -42,9 +42,9 @@ fi
 # Clear environment of PKGNAME or the dialog will show on older versions
 # that do not understand -v.
 if ! env -u PKGNAME ${DIALOG4PORTS} -v > /dev/null 2>&1; then
-	exec env LC_ALL=C.UTF-8 $DIALOG4PORTS > $OPTIONSFILE 2>&1
+	exec $DIALOG4PORTS > $OPTIONSFILE 2>&1
 fi
 
 # Newer versions use stderr to work around a jail issue
 # http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082383.html
-exec env LC_ALL=C.UTF-8 $DIALOG4PORTS 2> $OPTIONSFILE
+exec $DIALOG4PORTS 2> $OPTIONSFILE
diff --git a/Mk/Uses/elixir.mk b/Mk/Uses/elixir.mk
index 89d29aa9c46d..c179e87fa3aa 100644
--- a/Mk/Uses/elixir.mk
+++ b/Mk/Uses/elixir.mk
@@ -10,7 +10,6 @@
 # ELIXIR_LIB_ROOT	- Elixir default library path
 # ELIXIR_APP_ROOT	- Root directory for this Elixir app
 # ELIXIR_HIDDEN		- Applications to be hidden from the code path; usually ${PORTNAME}
-# ELIXIR_LOCALE		- An UTF-8 locale to be used by Elixir during builds (any UTF-8 locale is good)
 # MIX_CMD		- The "mix" command
 # MIX_COMPILE		- The "mix" command used to compile an Elixir app
 # MIX_REWRITE		- Automatically replace Mix dependencies with code paths
@@ -40,9 +39,8 @@ ELIXIR_APP_NAME?=	${PORTNAME}
 ELIXIR_LIB_ROOT?=	${LOCALBASE}/lib/elixir/lib
 ELIXIR_APP_ROOT?=	${PREFIX}/lib/elixir/lib/${ELIXIR_APP_NAME}
 ELIXIR_HIDDEN?=		"^${ELIXIR_APP_NAME}$$"
-ELIXIR_LOCALE?=		en_US.UTF-8
 MIX_CMD?=		${LOCALBASE}/bin/mix
-MIX_COMPILE?=		${SETENVI} ${WRK_ENV} ${MIX_ENV} LANG=${ELIXIR_LOCALE} LC_ALL=${ELIXIR_LOCALE} MIX_ENV=${MIX_ENV_NAME} ELIXIR_HIDDEN=${ELIXIR_HIDDEN} ${MIX_CMD} ${MIX_TARGET}
+MIX_COMPILE?=		${SETENVI} ${WRK_ENV} ${MIX_ENV} MIX_ENV=${MIX_ENV_NAME} ELIXIR_HIDDEN=${ELIXIR_HIDDEN} ${MIX_CMD} ${MIX_TARGET}
 MIX_REWRITE?=
 MIX_BUILD_DEPS?=
 MIX_RUN_DEPS?=
diff --git a/Mk/Uses/gem.mk b/Mk/Uses/gem.mk
index e085c45fcab0..c542de25e2c6 100644
--- a/Mk/Uses/gem.mk
+++ b/Mk/Uses/gem.mk
@@ -46,9 +46,6 @@ GEM_CACHE?=	${CACHE_DIR}/${GEM_NAME}.gem
 GEMSPEC=	${PORTNAME}.gemspec
 GEM_ENV+=	RB_USER_INSTALL=yes
 
-USE_LOCALE?=	en_US.UTF-8
-GEM_ENV+=	LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE}
-
 PLIST_SUB+=	PORTVERSION="${PORTVERSION}" \
 		REV="${RUBY_GEM}" \
 		GEMS_BASE_DIR="${GEMS_BASE_DIR}" \
diff --git a/Mk/Uses/gnome.mk b/Mk/Uses/gnome.mk
index 0589811d2825..349263b79fad 100644
--- a/Mk/Uses/gnome.mk
+++ b/Mk/Uses/gnome.mk
@@ -83,10 +83,6 @@ _USE_GNOME_ALL+=atkmm cairomm cairomm11 glibmm glibmm26 gtkmm24 \
 		gtkmm30 gtkmm40 gtksourceviewmm3 libxml++26 libsigc++20 \
 		libsigc++30 pangomm pangomm24
 
-# glib-mkenums often fails with C locale
-# https://gitlab.gnome.org/GNOME/glib/issues/1430
-USE_LOCALE?=	en_US.UTF-8
-
 GNOME_HTML_DIR?=	${PREFIX}/share/doc
 GCONF_CONFIG_OPTIONS?=	merged
 GCONF_CONFIG_DIRECTORY?=etc/gconf/gconf.xml.defaults
diff --git a/Mk/Uses/kde.mk b/Mk/Uses/kde.mk
index a5b8c2d2defb..6daacb7e2eab 100644
--- a/Mk/Uses/kde.mk
+++ b/Mk/Uses/kde.mk
@@ -239,8 +239,6 @@ IGNORE?=		unknown CATEGORY value '${_KDE_CATEGORY}' #'
 .    endif #defined(_KDE_CATEGORY)
 
 # ==============================================================================
-# === SET UP LOCALE ENVIRONMENT =================================================
-USE_LOCALE?=	en_US.UTF-8
 
 # === SET UP CMAKE ENVIRONMENT =================================================
 # Help cmake to find files when testing ports with non-default PREFIX.
diff --git a/Mk/Uses/meson.mk b/Mk/Uses/meson.mk
index 3a5aa9d7eba9..c48f08a84199 100644
--- a/Mk/Uses/meson.mk
+++ b/Mk/Uses/meson.mk
@@ -45,9 +45,6 @@ BUILD_DEPENDS+=	meson:devel/meson
 # meson uses ninja
 .include "${USESDIR}/ninja.mk"
 
-# meson might have issues with non-unicode locales
-USE_LOCALE?=	en_US.UTF-8
-
 # Enable muon's meson compatibility mode
 .  if !empty(meson_ARGS:Mmuon)
 CONFIGURE_ARGS+=	meson
diff --git a/Mk/Uses/npm.mk b/Mk/Uses/npm.mk
index 769d7c9e07d7..730d9c2d3ca8 100644
--- a/Mk/Uses/npm.mk
+++ b/Mk/Uses/npm.mk
@@ -240,8 +240,7 @@ npm-fetch-node-package-manager:
 		${SETENV} SCRIPTSDIR=${SCRIPTSDIR} WRKDIR=${WRKDIR} \
 			${SH} ${SCRIPTSDIR}/npm-create-mtree.sh ${NPM_CMDNAME} > \
 			${NPM_CMDNAME}.mtree && \
-		${SETENV} LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
-			${TAR} -cz --options 'gzip:!timestamp' \
+		${TAR} -cz --options 'gzip:!timestamp' \
 			-f ${DISTDIR}/${DIST_SUBDIR}/${NPM_CMDNAME}-${NPM_VER}.tgz @${NPM_CMDNAME}.mtree; \
 	fi
 	@${SETENV} ${MAKE_ENV} corepack install -g ${DISTDIR}/${DIST_SUBDIR}/${NPM_CMDNAME}-${NPM_VER}.tgz
@@ -292,8 +291,7 @@ npm-archive-node-modules:
 				${SH} ${SCRIPTSDIR}/npm-create-mtree.sh $${dir} >> \
 				${WRKDIR}/node-modules-cache.mtree; \
 		done; \
-		${SETENV} LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
-			${TAR} -cz --options 'gzip:!timestamp' \
+		${TAR} -cz --options 'gzip:!timestamp' \
 			-f ${DISTDIR}/${DIST_SUBDIR}/${_DISTFILE_prefetch} \
 			-C ${WRKDIR} @node-modules-cache.mtree; \
 		if [ ${TMPDIR} != ${WRKDIR} ]; then \
@@ -409,8 +407,7 @@ npm-archive-node-modules:
 		${SETENV} SCRIPTSDIR=${SCRIPTSDIR} WRKDIR=${WRKDIR} \
 			${SH} ${SCRIPTSDIR}/npm-create-mtree.sh ${NPM_MODULE_CACHE} > \
 			node-modules-cache.mtree && \
-		${SETENV} LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
-			${TAR} -cz --options 'gzip:!timestamp' \
+		${TAR} -cz --options 'gzip:!timestamp' \
 			-f ${DISTDIR}/${DIST_SUBDIR}/${_DISTFILE_prefetch} @node-modules-cache.mtree; \
 		if [ ${TMPDIR} != ${WRKDIR} ]; then \
 			${RM} -r ${WRKDIR}; \
diff --git a/Mk/Uses/qt.mk b/Mk/Uses/qt.mk
index 805804e30d17..4316034ca2cd 100644
--- a/Mk/Uses/qt.mk
+++ b/Mk/Uses/qt.mk
@@ -122,11 +122,6 @@ PLIST_SUB+=		QT_${dir}DIR="${QT_${dir}DIR_REL}"
 .    endif
 .  endfor
 
-# Suppress warnings from rcc about not using a UTF-8 locale.
-.  if ${_QT_VER:M6}
-USE_LOCALE?=		C.UTF-8
-.  endif
-
 CONFIGURE_ENV+=		QT_SELECT=${_QT_RELNAME}
 MAKE_ENV+=		QT_SELECT=${_QT_RELNAME}
 
diff --git a/Mk/bsd.licenses.mk b/Mk/bsd.licenses.mk
index e66d223b7e4c..ac47582c3f2c 100644
--- a/Mk/bsd.licenses.mk
+++ b/Mk/bsd.licenses.mk
@@ -648,7 +648,7 @@ ${_LICENSE_COOKIE}:
 .      if !defined(NO_LICENSES_DIALOGS)
 # Dialog interface
 .        if ${_LICENSE_COMB} == "single"
-	@${SETENV} LC_ALL=C.UTF-8 ${DIALOG} --title "License for ${PKGNAME} (${_LICENSE})" \
+	@${DIALOG} --title "License for ${PKGNAME} (${_LICENSE})" \
 		--yes-label Accept --no-label Reject --yesno \
 		"$$(${CAT} ${_LICENSE_FILE})" 21 76
 
@@ -665,13 +665,13 @@ ${_LICENSE_COOKIE}:
 	done; \
 	menu_cmd="$${menu_cmd} REJECT \"Reject the licenses (all)\""; \
 	while true; do \
-		${SH} -c "${SETENV} LC_ALL=C.UTF-8 $${menu_cmd} 2>\"$${tmpfile}\""; \
+		${SH} -c "$${menu_cmd} 2>\"$${tmpfile}\""; \
 		result=$$(${CAT} "$${tmpfile}"); \
 		case $${result} in \
 		REJECT) exit 1;; \
 		VIEW_*) name=$$(${ECHO_CMD} $${result} | ${SED} -e 's/^VIEW_//'); \
 				file=$$(${GREP} "^$${name}:" ${_LICENSE_ASK_DATA} | ${CUT} -d : -f 2); \
-				${SETENV} LC_ALL=C.UTF-8 ${DIALOG} --textbox "$${file}" 21 75 ;; \
+				${DIALOG} --textbox "$${file}" 21 75 ;; \
 		USE_*)  name=$$(${ECHO_CMD} $${result} | ${SED} -e 's/^USE_//'); \
 				${ECHO_CMD} $${name} > ${_LICENSE_COOKIE}; \
 				break ;; \
@@ -683,7 +683,7 @@ ${_LICENSE_COOKIE}:
 .          for lic in ${_LICENSE_TO_ASK}
 	@${ECHO_CMD} "${lic}:${_LICENSE_FILE_${lic}}" >> ${_LICENSE_ASK_DATA}
 .          endfor
-	@menu_cmd="${SETENV} LC_ALL=C.UTF-8 ${DIALOG} --hline \"This port requires you to accept all mentioned licenses\" --menu \"License for ${PKGNAME} (multi)\" 21 70 15"; \
+	@menu_cmd="${DIALOG} --hline \"This port requires you to accept all mentioned licenses\" --menu \"License for ${PKGNAME} (multi)\" 21 70 15"; \
 	trap '${RM} $$tmpfile' EXIT INT TERM; \
 	tmpfile=$$(mktemp -t portlicenses); \
 	for lic in ${_LICENSE_TO_ASK}; do \
@@ -698,7 +698,7 @@ ${_LICENSE_COOKIE}:
 		REJECT) exit 1 ;; \
 		VIEW_*) name=$$(${ECHO_CMD} $${result} | ${SED} -e 's/^VIEW_//'); \
 				file=$$(${GREP} "^$${name}:" ${_LICENSE_ASK_DATA} | ${CUT} -d : -f 2); \
-				${SETENV} LC_ALL=C.UTF-8 ${DIALOG} --textbox "$${file}" 21 75 ;; \
+				${DIALOG} --textbox "$${file}" 21 75 ;; \
 		esac; \
 	done
 .        endif
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 9e2f1ffb0285..4b5aa3978325 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -343,9 +343,6 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 #				  can be used in Makefiles by port maintainers
 #				  if a port breaks with it.
 ##
-# USE_LOCALE	- LANG and LC_ALL are set to the value of this variable in
-#				  CONFIGURE_ENV and MAKE_ENV.  Example: USE_LOCALE=en_US.UTF-8
-##
 # USE_GCC		- If set, this port requires this version of gcc, either in
 #				  the system or installed from a port.
 # USE_CSTD		- Override the default C language standard (gnu89, gnu99)
@@ -681,6 +678,7 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 # For extract:
 #
 # EXTRACT_ENV	- Environment to pass to ${EXTRACT_CMD}
+#				  Default: none
 # EXTRACT_CMD	- Command for extracting archive
 #				  Default: ${TAR}
 # EXTRACT_BEFORE_ARGS
@@ -994,8 +992,8 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 # Most port authors should not need to understand anything after this point.
 #
 
-LANG=		C
-LC_ALL=		C
+LANG=		C.UTF-8
+LC_ALL=		C.UTF-8
 .export		LANG LC_ALL
 
 # These need to be absolute since we don't know how deep in the ports
@@ -1589,6 +1587,7 @@ PKG_NOTE_flavor=	${FLAVOR}
 # GIT_CEILING_DIRECTORIES prevents ports that try to find their version
 # using git from finding the ports tree's git repository.
 WRK_ENV+=		HOME=${WRKDIR} \
+				LANG=C.UTF-8 \
 				MACHINE_ARCH=${MACHINE_ARCH} \
 				PWD="$${PWD}" \
 				GIT_CEILING_DIRECTORIES=${WRKDIR} \
@@ -1988,10 +1987,6 @@ ERROR+=	"Unknown USES=${f:C/\:.*//}"
 .      endif
 .    endif
 
-.    if defined(USE_LOCALE)
-WRK_ENV+=	LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE}
-.    endif
-
 # Macro for doing in-place file editing using regexps.  REINPLACE_ARGS may only
 # be used to set or override the -i argument.  Any other use is considered
 # invalid.
@@ -2144,7 +2139,6 @@ PATCH_DIST_ARGS+=	--suffix .orig
 TAR?=	/usr/bin/tar
 
 # EXTRACT_SUFX is defined in .pre.mk section
-EXTRACT_ENV?=	LC_ALL=C.UTF-8
 EXTRACT_CMD?=	${TAR}
 EXTRACT_BEFORE_ARGS?=	-xf
 EXTRACT_AFTER_ARGS?=	--no-same-owner --no-same-permissions
diff --git a/Tools/scripts/add-port-to-category-makefile.sh b/Tools/scripts/add-port-to-category-makefile.sh
index f77c46b0c90c..fcd6a48c7c35 100755
--- a/Tools/scripts/add-port-to-category-makefile.sh
+++ b/Tools/scripts/add-port-to-category-makefile.sh
@@ -7,7 +7,7 @@ PORT="$1"
 set -e
 set -o pipefail
 
-export LC_ALL=C
+export LC_ALL=C.UTF-8
 
 ##
 ## add-port-to-category-makefile.sh: adds a new port to {category}/Makefile
diff --git a/Tools/scripts/git-diff-ports.sh b/Tools/scripts/git-diff-ports.sh
index 9870dfd38913..fd207b5eb874 100755
--- a/Tools/scripts/git-diff-ports.sh
+++ b/Tools/scripts/git-diff-ports.sh
@@ -3,7 +3,7 @@
 # MAINTAINER: yuri@FreeBSD.org
 
 set -o pipefail
-export LC_ALL=C
+export LC_ALL=C.UTF-8
 
 # ----- Dependency check ----------------------------------------------
 for dep in git; do
diff --git a/Tools/scripts/git-get-latest-remote-version.sh b/Tools/scripts/git-get-latest-remote-version.sh
index 692a4fb1c8ef..a67a1df9e1da 100755
--- a/Tools/scripts/git-get-latest-remote-version.sh
+++ b/Tools/scripts/git-get-latest-remote-version.sh
@@ -5,7 +5,7 @@
 set -e
 set -o pipefail
 
-export LC_ALL=C
+export LC_ALL=C.UTF-8
 
 ##
 ## git-get-latest-remote-version.sh: retrieves the latest version of a remote project at the given Git URL
diff --git a/Tools/scripts/hackage-get-latest-version.sh b/Tools/scripts/hackage-get-latest-version.sh
index 3ad21fcbd73a..0f0bb84a86b2 100755
--- a/Tools/scripts/hackage-get-latest-version.sh
+++ b/Tools/scripts/hackage-get-latest-version.sh
@@ -5,7 +5,7 @@
 set -e
 set -o pipefail
 
-export LC_ALL=C
+export LC_ALL=C.UTF-8
 
 ##
 ## hackage-get-latest-version.sh: retrieves the latest version of a given Haskell package as registered on https://hackage.haskell.org
diff --git a/Tools/scripts/npmjs-fetch-with-dependencies.sh b/Tools/scripts/npmjs-fetch-with-dependencies.sh
index d2c95ccb095e..ee44fb2c7cad 100755
--- a/Tools/scripts/npmjs-fetch-with-dependencies.sh
+++ b/Tools/scripts/npmjs-fetch-with-dependencies.sh
@@ -14,7 +14,7 @@
 set -eu -o pipefail
 set -o pipefail
 
-export LC_ALL=C
+export LC_ALL=C.UTF-8
 
 ##
 ## npmjs-get-latest-version.sh: retrieves the latest version of a given Node.js package as registered on https://registry.npmjs.org
diff --git a/Tools/scripts/npmjs-get-latest-version.sh b/Tools/scripts/npmjs-get-latest-version.sh
index 122211f03df8..8b5152f5efcd 100755
--- a/Tools/scripts/npmjs-get-latest-version.sh
+++ b/Tools/scripts/npmjs-get-latest-version.sh
@@ -5,7 +5,7 @@
 set -e
 set -o pipefail
 
-export LC_ALL=C
+export LC_ALL=C.UTF-8
 
 ##
 ## npmjs-get-latest-version.sh: retrieves the latest version of a given Node.js package as registered on https://registry.npmjs.org
diff --git a/Tools/scripts/pypi-get-latest-version.sh b/Tools/scripts/pypi-get-latest-version.sh
index ce7143042367..38b4ee7a44f3 100755
--- a/Tools/scripts/pypi-get-latest-version.sh
+++ b/Tools/scripts/pypi-get-latest-version.sh
@@ -5,7 +5,7 @@
 set -e
 set -o pipefail
 
-export LC_ALL=C
+export LC_ALL=C.UTF-8
 
 ##
 ## pypi-get-latest-version.sh: retrieves the latest version of a given Python package as registered on https://pypi.org
diff --git a/audio/flac/Makefile b/audio/flac/Makefile
index 63ff64f9ee97..8549d771207f 100644
--- a/audio/flac/Makefile
+++ b/audio/flac/Makefile
@@ -23,10 +23,6 @@ USE_LDCONFIG=	yes
 
 CPE_VENDOR=	flac_project
 
-# Preserve UTF-8 filenames in test/flac-to-flac-metadata-test-files/.
-# They are referenced by the test suite.
-EXTRACT_CMD=	${SETENV} LC_ALL=C.UTF-8 ${TAR}
-
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-static \
diff --git a/audio/flacon/Makefile b/audio/flacon/Makefile
index 0551b5c6c1e3..1787ba5a19f9 100644
--- a/audio/flacon/Makefile
+++ b/audio/flacon/Makefile
@@ -29,8 +29,7 @@ USE_QT=		buildtools:build concurrent:build qmake:build testlib:build \
 CMAKE_ARGS=	-DBUILD_TESTS:BOOL=YES
 
 do-test:
-	@cd ${TEST_WRKSRC} && LC_ALL=C.UTF-8 ctest -C ${CMAKE_BUILD_TYPE} \
-		${_MAKE_JOBS}
+	@cd ${TEST_WRKSRC} && ctest -C ${CMAKE_BUILD_TYPE} ${_MAKE_JOBS}
 	@${CAT} ${TEST_WRKSRC}/Testing/Temporary/LastTest.log
 
 .include <bsd.port.mk>
diff --git a/audio/picard/Makefile b/audio/picard/Makefile
index 563d9e816381..8dd96f6e76d5 100644
--- a/audio/picard/Makefile
+++ b/audio/picard/Makefile
@@ -22,7 +22,6 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}discid>=1.0:audio/py-discid@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pyjwt>=2.0:www/py-pyjwt@${PY_FLAVOR}
 
 USES=		desktop-file-utils gettext-tools pyqt:5 python
-USE_LOCALE=	en_US.UTF-8
 USE_PYQT=	pyqt5:run
 USE_PYTHON=	autoplist noflavors pep517 unittest
 
diff --git a/audio/synthpod-lv2/Makefile b/audio/synthpod-lv2/Makefile
index 462a2c117e21..7963b1692356 100644
--- a/audio/synthpod-lv2/Makefile
+++ b/audio/synthpod-lv2/Makefile
@@ -74,7 +74,7 @@ do-fetch:
 	    git clone -q ${GIT_URL} ${PORTNAME}-${DISTVERSIONFULL} && \
 	    (cd ${PORTNAME}-${DISTVERSIONFULL} && git reset -q --hard ${GIT_TAGNAME} && ${RM} -r .git) && \
 	    ${FIND} ${PORTNAME}-${DISTVERSIONFULL} -and -exec ${TOUCH} -h -d 1970-01-01T00:00:00Z {} \; && \
-	    ${FIND} ${PORTNAME}-${DISTVERSIONFULL} -print0 | LC_ALL=C ${SORT} -z | \
+	    ${FIND} ${PORTNAME}-${DISTVERSIONFULL} -print0 | ${SORT} -z | \
 	        ${TAR} czf ${PORTNAME}-${DISTVERSIONFULL}${EXTRACT_SUFX} --format=ustar --gid 0 --uid 0 --options gzip:!timestamp --no-recursion --null -T - && \
 	    ${RM} -r ${PORTNAME}-${DISTVERSIONFULL}; \
 	fi
diff --git a/biology/gatk/Makefile b/biology/gatk/Makefile
index fa897c4fbe39..428542024b3c 100644
--- a/biology/gatk/Makefile
+++ b/biology/gatk/Makefile
@@ -77,7 +77,7 @@ do-fetch:
 			${RM} -r ${WRKDIR} \
 		) && \
 		${FIND} ${PORTNAME}-${DISTVERSION} -and -exec ${TOUCH} -h -d 1970-01-01T00:00:00Z {} \; && \
-		${FIND} ${PORTNAME}-${DISTVERSION} -print0 | LC_ALL=C ${SORT} -z | \
+		${FIND} ${PORTNAME}-${DISTVERSION} -print0 | ${SORT} -z | \
 		${SETENV} -i ${TAR} czf ${DISTNAME}${EXTRACT_SUFX} --format=cpio --gid 0 --uid 0 --options gzip:!timestamp --no-recursion --null -T - && \
 		${RM} -r ${PORTNAME}-${DISTVERSION}; \
 	fi
diff --git a/biology/jalview/Makefile b/biology/jalview/Makefile
index a8bf6c6e9e5e..690e2871c72e 100644
--- a/biology/jalview/Makefile
+++ b/biology/jalview/Makefile
@@ -21,8 +21,6 @@ JAVA_VERSION=	11
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-USE_LOCALE=	en_US.UTF-8
-
 DATADIR=	${JAVASHAREDIR}/${PORTNAME}
 SUB_FILES=	jalview.sh
 SUB_LIST=	JAVA=${JAVA}
diff --git a/deskutils/R-cran-exams/Makefile b/deskutils/R-cran-exams/Makefile
index e47eb49641f7..efb29d876e16 100644
--- a/deskutils/R-cran-exams/Makefile
+++ b/deskutils/R-cran-exams/Makefile
@@ -30,7 +30,6 @@ TEST_DEPENDS=	pdftex:print/tex-formats \
 
 USES=		cran:auto-plist
 
-MAKE_ENV=	LC_ALL=C.UTF-8 \
-		R_ZIPCMD=${LOCALBASE}/bin/zip
+MAKE_ENV=	R_ZIPCMD=${LOCALBASE}/bin/zip
 
 .include <bsd.port.mk>
diff --git a/deskutils/joplin-desktop/Makefile b/deskutils/joplin-desktop/Makefile
index dc2a64d5f3be..75288b2e741d 100644
--- a/deskutils/joplin-desktop/Makefile
+++ b/deskutils/joplin-desktop/Makefile
@@ -76,8 +76,7 @@ pre-fetch:
 		${SETENV} SCRIPTSDIR=${SCRIPTSDIR} WRKDIR=${WRKDIR} \
 			${SH} ${SCRIPTSDIR}/electron-create-mtree.sh node-modules-cache > \
 			node-modules-cache.mtree && \
-		${SETENV} LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
-			${TAR} -cz --options 'gzip:!timestamp' \
+		${TAR} -cz --options 'gzip:!timestamp' \
 			-f ${DISTDIR}/${DEFAULT_PLUGINS_NODE_MODULES_FILE} @node-modules-cache.mtree; \
 		${RM} -r ${WRKDIR}/node-modules-cache; \
 	fi
@@ -93,8 +92,7 @@ pre-fetch:
 		${SETENV} SCRIPTSDIR=${SCRIPTSDIR} WRKDIR=${WRKDIR} \
 			${SH} ${SCRIPTSDIR}/electron-create-mtree.sh node-modules-cache-app-clipper > \
 			node-modules-cache-app-clipper.mtree && \
-		${SETENV} LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
-			${TAR} -cz --options 'gzip:!timestamp' \
+		${TAR} -cz --options 'gzip:!timestamp' \
 			-f ${DISTDIR}/${APP_CLIPPER_NODE_MODULES_FILE} @node-modules-cache-app-clipper.mtree; \
 		${RM} -r ${WRKDIR}/node-modules-cache-app-clipper; \
 	fi
diff --git a/devel/R-cran-data.table/Makefile b/devel/R-cran-data.table/Makefile
index b255de9c2250..bd7b271fc289 100644
--- a/devel/R-cran-data.table/Makefile
+++ b/devel/R-cran-data.table/Makefile
@@ -16,10 +16,6 @@ TEST_DEPENDS=	R-cran-bit64>0:devel/R-cran-bit64 \
 
 USES=		cran:auto-plist,compiles pkgconfig
 
-# Tests	needs /etc/locatime symlink defined to succeed
-# and C.UTF-8 env set:
-MAKE_ENV=	LC_ALL=C.UTF-8
-
 NO_ARCH_IGNORE=	data_table.so
 
 post-install:
diff --git a/devel/R-cran-lintr/Makefile b/devel/R-cran-lintr/Makefile
index c9584b44dd16..92f7fc5d6271 100644
--- a/devel/R-cran-lintr/Makefile
+++ b/devel/R-cran-lintr/Makefile
@@ -31,8 +31,6 @@ TEST_DEPENDS=	R-cran-cyclocomp>0:devel/R-cran-cyclocomp \
 
 USES=		cran:auto-plist
 
-MAKE_ENV=	LC_ALL=C.UTF-8
-
 post-install:
 	@${ECHO_CMD} "@dir ${R_MOD_DIR}/help/figures" >> ${TMPPLIST}
 
diff --git a/devel/R-cran-sessioninfo/Makefile b/devel/R-cran-sessioninfo/Makefile
index 50ee2d99ffcd..c5383d937351 100644
--- a/devel/R-cran-sessioninfo/Makefile
+++ b/devel/R-cran-sessioninfo/Makefile
@@ -19,6 +19,4 @@ TEST_DEPENDS=	R-cran-callr>0:devel/R-cran-callr \
 
 USES=		cran:auto-plist
 
-MAKE_ENV+=	LC_ALL="C.UTF-8"
-
 .include <bsd.port.mk>
diff --git a/devel/R-cran-testthat/Makefile b/devel/R-cran-testthat/Makefile
index 60812deb6a8c..fcf2ba06bba4 100644
--- a/devel/R-cran-testthat/Makefile
+++ b/devel/R-cran-testthat/Makefile
@@ -31,8 +31,6 @@ RUN_DEPENDS=	R-cran-brio>=1.1.5:devel/R-cran-brio \
 
 USES=		cran:auto-plist,compiles
 
-MAKE_ENV=	LC_ALL=C.UTF-8
-
 do-test:
 	@${FIND} ${WRKSRC} \( -name '*.o' -o -name '*.so' \) -delete
 	@cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} _R_CHECK_FORCE_SUGGESTS_=FALSE \
diff --git a/devel/R-cran-vctrs/Makefile b/devel/R-cran-vctrs/Makefile
index c7d95a62cc66..2081862ed7b3 100644
--- a/devel/R-cran-vctrs/Makefile
+++ b/devel/R-cran-vctrs/Makefile
@@ -35,8 +35,6 @@ TEST_DEPENDS=	R-cran-bit64>0:devel/R-cran-bit64 \
 
 USES=		compiler:c++11-lang cran:auto-plist,compiles
 
-MAKE_ENV=	LC_ALL=C.UTF-8
-
 do-test:
 	@${FIND} ${WRKSRC} \( -name '*.o' -o -name '*.so' \) -delete
 	@cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} _R_CHECK_FORCE_SUGGESTS_=FALSE \
diff --git a/devel/aarch64-none-elf-gcc/Makefile b/devel/aarch64-none-elf-gcc/Makefile
index dbc898bba0e0..a8cac18526a4 100644
--- a/devel/aarch64-none-elf-gcc/Makefile
+++ b/devel/aarch64-none-elf-gcc/Makefile
@@ -51,15 +51,6 @@ INSTALL_TARGET=	install-gcc install-target-libgcc
 
 .include <bsd.port.pre.mk>
 
-# Extraction fails with poudriere on aarch64 for GCC 11.
-# It seems that the bug is specific to lang/gcc11 and lang/gcc12 only.
-# No other GCC port is affected.
-# See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271052
-# and https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246670
-.if ${ARCH} == aarch64
-EXTRACT_CMD=    ${SETENV} LC_ALL=en_US.UTF-8 /usr/bin/bsdtar
-.endif
-
 post-patch:
 	@${REINPLACE_CMD} -e '/LIBSTDCXX/ s/stdc\+\+/c\+\+/g ' \
 		${WRKSRC}//gcc/cp/g++spec.c
diff --git a/devel/cmake-doc/Makefile b/devel/cmake-doc/Makefile
index a5df89a190da..34bb3c3d4c95 100644
--- a/devel/cmake-doc/Makefile
+++ b/devel/cmake-doc/Makefile
@@ -13,7 +13,6 @@ LICENSE_FILE=	${WRKSRC}/Copyright.txt
 BUILD_DEPENDS=	sphinx-build:textproc/py-sphinx@${PY_FLAVOR}
 
 USES=		cmake python:build qt:6
-USE_LOCALE=	en_US.UTF-8
 USE_QT=		sqldriver-sqlite:build tools:build
 
 CMAKE_ARGS=	-DCMAKE_DOC_DIR:STRING="${DOCSDIR_REL}" \
diff --git a/devel/cmake-man/Makefile b/devel/cmake-man/Makefile
index 63fd86fe2433..d8bc71bf3ad5 100644
--- a/devel/cmake-man/Makefile
+++ b/devel/cmake-man/Makefile
@@ -12,7 +12,6 @@ LICENSE=	BSD3CLAUSE
 BUILD_DEPENDS=	sphinx-build:textproc/py-sphinx@${PY_FLAVOR}
 
 USES=		cmake python:build
-USE_LOCALE=	en_US.UTF-8
 
 CMAKE_ARGS=	-DCMAKE_DOC_DIR:STRING="${DOCSDIR_REL}" \
 		-DCMAKE_MAN_DIR:STRING="share/man"
diff --git a/devel/hs-cabal-plan/Makefile b/devel/hs-cabal-plan/Makefile
index 75442be58d87..748ff739bd8a 100644
--- a/devel/hs-cabal-plan/Makefile
+++ b/devel/hs-cabal-plan/Makefile
@@ -11,8 +11,6 @@ LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE.GPLv2
 
 USES=		cabal
-USE_LOCALE=	en_US.UTF-8
-
 USE_CABAL=	OneTuple-0.4.2_1 \
 		QuickCheck-2.16.0.0 \
 		StateVar-1.2.2 \
diff --git a/devel/hs-git-annex/Makefile b/devel/hs-git-annex/Makefile
index c4e8727c808c..86076c6611e2 100644
--- a/devel/hs-git-annex/Makefile
+++ b/devel/hs-git-annex/Makefile
@@ -14,7 +14,6 @@ BUILD_DEPENDS=	${MY_DEPENDS}
 RUN_DEPENDS=	${MY_DEPENDS}
 
 USES=		cabal perl5
-USE_LOCALE=	en_US.UTF-8
 USE_PERL5=	build
 
 USE_CABAL=	DAV-1.3.4 \
diff --git a/devel/hs-hadolint/Makefile b/devel/hs-hadolint/Makefile
index 813f74e21b53..72e0b0c293da 100644
--- a/devel/hs-hadolint/Makefile
+++ b/devel/hs-hadolint/Makefile
@@ -12,8 +12,6 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 BUILD_DEPENDS=	ghc:lang/ghc
 
 USES=		cabal
-USE_LOCALE=	en_US.UTF-8
-
 USE_CABAL=	Diff-1.0.2 \
 		HsYAML-0.2.1.5_1 \
 		OneTuple-0.4.3 \
diff --git a/devel/hs-haskell-language-server/Makefile b/devel/hs-haskell-language-server/Makefile
index 18fbf2638f70..9d937db0641f 100644
--- a/devel/hs-haskell-language-server/Makefile
+++ b/devel/hs-haskell-language-server/Makefile
@@ -31,8 +31,6 @@ GHC_VERSION=	9.8.4
 
 USES=		cabal
 
-USE_LOCALE=	C.UTF-8
-
 .for flavor in ${FLAVORS}
 .	include "Makefile.cabal.${flavor}"
 .endfor
diff --git a/devel/hs-hlint/Makefile b/devel/hs-hlint/Makefile
index 6ccd08f8a922..ca2047bf2b12 100644
--- a/devel/hs-hlint/Makefile
+++ b/devel/hs-hlint/Makefile
@@ -9,8 +9,6 @@ WWW=		https://github.com/ndmitchell/hlint
 LICENSE=	BSD3CLAUSE
 
 USES=		cabal
-
-USE_LOCALE=	C.UTF-8
 USE_CABAL=	OneTuple-0.4.2_1 \
 		QuickCheck-2.15.0.1_1 \
 		StateVar-1.2.2 \
diff --git a/devel/hs-ormolu/Makefile b/devel/hs-ormolu/Makefile
index e5de8ebf9f34..60ab24e54cd4 100644
--- a/devel/hs-ormolu/Makefile
+++ b/devel/hs-ormolu/Makefile
@@ -11,8 +11,6 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
 USES=		cabal
 
-USE_LOCALE=	C.UTF-8
-
 post-patch:
 	${REINPLACE_CMD} 's|jobs: 1|jobs: 2|' ${CABAL_HOME}/.cabal/config
 
diff --git a/devel/ice37/Makefile b/devel/ice37/Makefile
index 8fe6005fd70b..2936c28126b4 100644
--- a/devel/ice37/Makefile
+++ b/devel/ice37/Makefile
@@ -127,7 +127,7 @@ do-test-TEST-on:
 .for CONFIG in ${CONFIGS}
 	@${ECHO} Testing configuration ${CONFIG}
 	cd ${BUILD_WRKSRC} && \
-		${SETENV} LC_ALL=en_US.UTF-8 ${PYTHON_CMD} ./allTests.py \
+		${PYTHON_CMD} ./allTests.py \
 		--config=${CONFIG} \
 		$$(${TEST} $$(${IS_JAILED_CMD}) -eq 1 \
 			&& ${ECHO} ${JAILED_FILTER})
diff --git a/devel/meson-python/Makefile b/devel/meson-python/Makefile
index e0ce97139ac8..1fb79a480e0e 100644
--- a/devel/meson-python/Makefile
+++ b/devel/meson-python/Makefile
@@ -32,8 +32,6 @@ TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}build>0:devel/py-build@${PY_FLAVOR} \
 USES=		python
 USE_PYTHON=	autoplist concurrent cython_test pep517 pytest
 
-# tarball has UTF-8 filenames
-EXTRACT_CMD=	env LANG=C.UTF-8 LC_ALL=C.UTF-8 ${TAR}
 NO_ARCH=	yes
 
 .include <bsd.port.mk>
diff --git a/devel/py-appdirs/Makefile b/devel/py-appdirs/Makefile
index 233a6d324c10..0b79793144f0 100644
--- a/devel/py-appdirs/Makefile
+++ b/devel/py-appdirs/Makefile
@@ -19,6 +19,5 @@ USES=		python
 USE_PYTHON=	autoplist concurrent pep517
 
 NO_ARCH=	yes
-USE_LOCALE=	en_US.UTF-8
 
 .include <bsd.port.mk>
diff --git a/devel/py-buildbot/Makefile b/devel/py-buildbot/Makefile
index 679ebc4f31c0..c7ab03b539f6 100644
--- a/devel/py-buildbot/Makefile
+++ b/devel/py-buildbot/Makefile
@@ -76,6 +76,6 @@ do-test:
 
 # Old invocation that we will probably need later
 # ${MKDIR} ${WRKDIR}/tmp
-# cd ${WRKDIR}/tmp && TZ=UTC LANG=C PYTHONPATH=${WRKSRC} ${PYTHON_CMD} -m twisted.trial buildbot.test
+# cd ${WRKDIR}/tmp && TZ=UTC PYTHONPATH=${WRKSRC} ${PYTHON_CMD} -m twisted.trial buildbot.test
 
 .include <bsd.port.mk>
diff --git a/devel/py-configparser/Makefile b/devel/py-configparser/Makefile
index 5c353617a0b2..4c9be3a0f0a5 100644
--- a/devel/py-configparser/Makefile
+++ b/devel/py-configparser/Makefile
@@ -15,7 +15,6 @@ LICENSE=	MIT
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}backports>=0:devel/py-backports@${PY_FLAVOR}
 
 USES=		python
-USE_LOCALE=	en_US.UTF-8
 USE_PYTHON=	distutils autoplist
 
 NO_ARCH=	yes
diff --git a/devel/py-cookiecutter/Makefile b/devel/py-cookiecutter/Makefile
index 4786e6d5bdce..2459d5f1be3c 100644
--- a/devel/py-cookiecutter/Makefile
+++ b/devel/py-cookiecutter/Makefile
@@ -35,13 +35,8 @@ CPE_VENDOR=	cookiecutter_project
 
 NO_ARCH=	yes
 
-# pytest needs a UTF-8 environment, and it will try and write outside
-# ${WRKDIR} unless told not to.
-
-TEST_ENV=	HOME=${WRKDIR} \
-		LANG=C.UTF-8 \
-		LC_ALL=C.UTF-8 \
-		TMPDIR=${WRKDIR}
+# pytest will try and write outside ${WRKDIR} unless told not to.
+TEST_ENV=	TMPDIR=${WRKDIR}
 
 # Windows specific test
 PYTEST_IGNORED_TESTS= test_run_shell_hooks_win
diff --git a/devel/py-jupyter_console/Makefile b/devel/py-jupyter_console/Makefile
index f760f07c2689..a78589cee28d 100644
--- a/devel/py-jupyter_console/Makefile
+++ b/devel/py-jupyter_console/Makefile
@@ -23,7 +23,6 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}jupyter-core>=4.12:devel/py-jupyter-core@${P
 		${PYTHON_PKGNAMEPREFIX}traitlets>=5.4:devel/py-traitlets@${PY_FLAVOR}
 
 USES=		python
-USE_LOCALE=	en_US.UTF-8
 USE_PYTHON=	autoplist pep517
 
 NO_ARCH=	yes
diff --git a/devel/py-molecule/Makefile b/devel/py-molecule/Makefile
index 468f09a18b95..1ee08fd368ea 100644
--- a/devel/py-molecule/Makefile
+++ b/devel/py-molecule/Makefile
@@ -48,10 +48,6 @@ USE_PYTHON=	autoplist concurrent pep517 pytest
 #
 # Test failures. Only three tests fail:
 #  test/unit/test_util.py ......FFF.......................   [ 23%]
-#
-# The click module demands a UTF-8 locale when used with python-3.x
-TEST_ENV=	LANG=en_US.UTF-8 \
-		LC_ALL=en_US.UTF-8
 
 NO_ARCH=	yes
 
diff --git a/devel/py-pytest-plus/Makefile b/devel/py-pytest-plus/Makefile
index 7a06cfb626da..1d90baafe081 100644
--- a/devel/py-pytest-plus/Makefile
+++ b/devel/py-pytest-plus/Makefile
@@ -20,7 +20,7 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=7.4.2:devel/py-pytest@${PY_FLAVOR}
 USES=		python
 USE_PYTHON=	autoplist pep517 pytest
 
-TEST_ENV=	LC_ALL=C.UTF-8 PYTHONPATH=${WRKSRC}/src TMPDIR=${WRKDIR}/
+TEST_ENV=	PYTHONPATH=${WRKSRC}/src TMPDIR=${WRKDIR}/
 NO_ARCH=	yes
 
 .include <bsd.port.mk>
diff --git a/devel/py-python-magic/Makefile b/devel/py-python-magic/Makefile
index 2d2c09cf8aca..3c898577a9d0 100644
--- a/devel/py-python-magic/Makefile
+++ b/devel/py-python-magic/Makefile
@@ -18,7 +18,7 @@ USES=		python
 USE_PYTHON=	autoplist concurrent pep517 pytest
 
 NO_ARCH=	yes
-TEST_ENV=	LC_ALL=en_US.UTF-8 PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR}
+TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR}
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	ahupp
diff --git a/devel/py-qt6-qscintilla2/Makefile b/devel/py-qt6-qscintilla2/Makefile
index d54fb9b69139..040856689762 100644
--- a/devel/py-qt6-qscintilla2/Makefile
+++ b/devel/py-qt6-qscintilla2/Makefile
@@ -17,7 +17,6 @@ LIB_DEPENDS=	libqscintilla2_qt6.so:devel/qscintilla2@qt6
 
 USES=		python pyqt:6 gl qt:6
 USE_GL=		gl
-USE_LOCALE=	C.UTF-8
 USE_PYQT=	pyqt6 qtbuilder:build sip:build
 USE_PYTHON=	concurrent flavors
 USE_QT=		base
diff --git a/devel/py-wheel/Makefile b/devel/py-wheel/Makefile
index ac86d221bd61..9b85ba66c3a6 100644
--- a/devel/py-wheel/Makefile
+++ b/devel/py-wheel/Makefile
@@ -25,8 +25,6 @@ USE_PYTHON+=	pytest
 TEST_ENV=	PYTHONPATH="${STAGEDIR}${PYTHON_SITELIBDIR}"
 .endif
 
-# see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268500
-EXTRACT_CMD=	${SETENV} LC_ALL=en_US.UTF-8 ${TAR}
 NO_ARCH=	yes
 
 .include <bsd.port.mk>
diff --git a/devel/py-wheel044/Makefile b/devel/py-wheel044/Makefile
index b74ea431f96a..5befbd05c55e 100644
--- a/devel/py-wheel044/Makefile
+++ b/devel/py-wheel044/Makefile
@@ -20,8 +20,6 @@ USE_PYTHON=	allflavors autoplist concurrent pep517
 
 PORTSCOUT=	ignore:1
 
-# see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268500
-EXTRACT_CMD=	${SETENV} LC_ALL=en_US.UTF-8 /usr/bin/bsdtar
*** 1250 LINES SKIPPED ***