Detect encoding for S3 transfer