test for encoding