bugfix encoding unit test (the code itself is fine).