Fix issue #89 and encoding

Tested on Windows 7.