Improving the support to different encodings