fix encoding and uppercase