Revert "Detect system encoding"

This reverts commit 62265dc8e6345eb9a38d93b9a4b3754fd942c17f.