fix encoding error when parsing non-ascii path or name or keywords