_findLib_ld() failed to decode the localized "ld" stderr in the locale
encoding.
(cherry picked from commit
66e313f471516bfa04c5c8966c159fafe6be082e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
result = None
try:
p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- universal_newlines=True)
+ stderr=subprocess.PIPE)
out, _ = p.communicate()
res = re.findall(expr, os.fsdecode(out))
for file in res:
--- /dev/null
+Fix :func:`ctypes.util.find_library` returning ``None`` in non-UTF-8 locales.