fixes #18 - correctly handling unicode conversion where appropriate