better handling of non-ASCII URLs and filenames