Fix for UTF8 setting encoding and setting order for S3

This is a fix for issue #124 requested by Wim.