[PATCH 1/2] Handle locale's encoding and script in a better way