Use buffer instead of specifying encoding

This seems to work best for 0.8