Date: Fri, 8 Mar 2019 13:22:47 -0500
On Fri, Mar 08, 2019 at 11:52:30 -0500, Tom Honermann wrote:
> Yes, I think this sounds good. I think we should also specify the
> transcoding requirement (though probably not the set of supported
> encodings) on a per-platform basis. This is to ensure that different
> tools on the same platform implement the same strategy.
I think a list of examples would be better. Windows and macOS have
strong enough backwards guarantees that we can trust that `fopen` won't
break on us.
> Corentin observed last night that Unicode normalization can interfere
> with filename round tripping. E.g., if the filename is read as UTF-8,
> stored in the JSON file, and then the JSON file is normalized (perhaps
> when read), then filenames may no longer match the on disk name. I
> think we need to address this somehow, but I don't have any specific
> suggestions other than "don't do that".
I suspect the concern here is macOS, but if I do `open("foo")`, but it
is really called, `FOO`, I get the same file, no? Is it not the case
with normalization as well?
Also, if a library is giving you something other than what's actually in
the file (with no way to get the original), I'd suggest finding a
different JSON reader library… Especially over something like
normalization.
--Ben
> Yes, I think this sounds good. I think we should also specify the
> transcoding requirement (though probably not the set of supported
> encodings) on a per-platform basis. This is to ensure that different
> tools on the same platform implement the same strategy.
I think a list of examples would be better. Windows and macOS have
strong enough backwards guarantees that we can trust that `fopen` won't
break on us.
> Corentin observed last night that Unicode normalization can interfere
> with filename round tripping. E.g., if the filename is read as UTF-8,
> stored in the JSON file, and then the JSON file is normalized (perhaps
> when read), then filenames may no longer match the on disk name. I
> think we need to address this somehow, but I don't have any specific
> suggestions other than "don't do that".
I suspect the concern here is macOS, but if I do `open("foo")`, but it
is really called, `FOO`, I get the same file, no? Is it not the case
with normalization as well?
Also, if a library is giving you something other than what's actually in
the file (with no way to get the original), I'd suggest finding a
different JSON reader library… Especially over something like
normalization.
--Ben
Received on 2019-03-08 19:22:51