added test for encoding weirdness