On Oct 6, 2016, at 7:36 PM, Lyndon Nerenberg <lyndon(_at_)orthanc(_dot_)ca>
wrote:
2) Perform an exclusive open+create of the filename.
2a) If the file exists, and we are interactive, prompt for a replacement name
(or to overwrite); else (2c)
2b) If the as-encoded filename results in an error from the underlying open()
call, report the error and fall through.
2c) Synthesize a unique name, write to that, and report the name.
Sorry, I was not at all clear about this. I am proposing NO decoding what so
ever of any incorrectly encoded file name. Case (2b) above avoids any issues
with filenames that are invalid for the implementation. And we can't count on
the old POSIX static semantics for those. As Ken pointed out, ZFS filesystem
have a switch that enforces UTF-8 compliance. Or not. It's not up to us to
judge "or not." open(2) determines the validity of the proposed filename.
--lyndon
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers