correctly encode utf-8 filenames in json