Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileHandle works in variable text/binary mode by default #5105

Open
jakepetroules opened this issue Oct 13, 2024 · 1 comment
Open

FileHandle works in variable text/binary mode by default #5105

jakepetroules opened this issue Oct 13, 2024 · 1 comment
Labels

Comments

@jakepetroules
Copy link
Contributor

See https://learn.microsoft.com/en-us/cpp/c-runtime-library/text-and-binary-mode-file-i-o?view=msvc-170

Constructors such as FileHandle.init(forReadingFrom:)should explicitly pass _O_BINARY to _openFileDescriptorForURL to control the translation mode; else the behavior is subject to the process global translation state, leading to inconsistent behavior.

@jakepetroules
Copy link
Contributor Author

@compnerd Do you have any thoughts on how this should work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant