Fix handling of Unicode characters in env vars