fixing unicode support and adding test