I removed the "locale" optional argument. OTOH locale-coding-system is a guess, what is really needed is the encoding used to encode filenames on the disk. I think "nil" here would mean "Emacs, do your best to decode this" -- maybe that's what we want ? Otoh, a filename isn't a lot of data, I don't know how good emacs will be at guessing.