C++ Logo


Advanced search

Re: [SG16-Unicode] P1689: Encoding of filenames for interchange

From: Tom Honermann <tom_at_[hidden]>
Date: Fri, 6 Sep 2019 02:35:27 -0400
On 9/5/19 11:57 PM, Thiago Macieira wrote:
> On Thursday, 5 September 2019 10:53:54 PDT Tom Honermann wrote:
>>> Future modern i/o in C++ may support byte-multiple filenames on Windows.
>>> For example, UTF-8, with a direct unreencoded path between userspace and
>>> the filing system. No need to hardcode the assumption that all of
>>> Windows will always be wchar_t based forever if unnecessary. Indeed,
>>> given the ever closer integration of the Linux and Windows kernels,
>>> efficiency would demand that much more of the NT kernel works natively
>>> in UTF-8, which it is designed to do just fine.
>> I agree with this. This is why I support a handle approach rather than
>> a byte based approach.
> I was very clear in the subject of the email: filenames for interchange. I
> knew the discussion of handles would come about.

Yes you were, and rightfully so. My bad, I took a tangent based on
prior discussions of path_view.

> You can't store a handle in a file, not in any OS I am familiar with.
> This discussion is how one process communicates to another the name of a file.
> By necessity, this can't use a handle, which would uniquely identify the file.
> This also means it's subject to all of the race condition attacks and issues
> with views of filesystem.
Well, there are ways to pass handles between processes, but lets not go
down this rabbit hole further :)


Received on 2019-09-06 08:35:30