Skip to content

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

Open
@jakepetroules

Description

@jakepetroules

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions