Allow setting encoding with environment variable