Encoding improved, ANSI by default + Unit test