Fix issue #21 + encoding