Setting correct encoding