`UnicodeEncodeError: 'ascii' codec can't encode character '✓'` when printing in a container.
IntermediateTroubleshootingRuntime, file, subprocess & encoding errors
Answer
Likely causes → The container has no UTF-8 locale (LANG unset, C/POSIX), so stdout encoding falls back to ASCII on older Pythons or tools.
Diagnose →
python -c "import sys, locale; print(sys.stdout.encoding, locale.getpreferredencoding())"
echo $LANG $LC_ALL
Fix → Set ENV LANG=C.UTF-8 (or PYTHONIOENCODING=utf-8, or PYTHONUTF8=1) in the Dockerfile.
Prevent → Base images with a UTF-8 locale; explicit encodings everywhere.
More on Runtime, file, subprocess & encoding errors
`KeyError: 'Tags'` while processing `describe_instances` output.Beginner`TypeError: can't compare offset-naive and offset-aware datetimes` in a snapshot-age check.Beginner`UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte` reading a log file.Intermediate`PermissionError: [Errno 13] Permission denied: '/var/log/app/report.json'`Intermediate`OSError: [Errno 24] Too many open files` in a long-running Python service.Intermediate`subprocess.CalledProcessError: Command '['terraform', 'plan']' returned non-zero exit status 1.` with no further detail.Beginner