Add support for different encodings
Add simple specs