added some debugging options
workaround and various tests for unicode issue